Uses of Class
com.google.common.geometry.S2LatLng
-
-
Uses of S2LatLng in com.google.common.geometry
Fields in com.google.common.geometry declared as S2LatLng Modifier and Type Field Description static S2LatLngS2LatLng. CENTERThe center point the lat/lng coordinate system.Methods in com.google.common.geometry that return S2LatLng Modifier and Type Method Description S2LatLngS2LatLng. add(S2LatLng o)Adds the given point to this point.static S2LatLngS2LatLng. fromDegrees(double latDegrees, double lngDegrees)Returns a new S2LatLng converted from degrees.static S2LatLngS2LatLng. fromE5(int latE5, int lngE5)Returns a new S2LatLng converted from tens of microdegrees.static S2LatLngS2LatLng. fromE6(int latE6, int lngE6)Returns a new S2LatLng converted from microdegrees.static S2LatLngS2LatLng. fromE7(int latE7, int lngE7)Returns a new S2LatLng converted from tenths of a microdegree.static S2LatLngS2LatLng. fromRadians(double latRadians, double lngRadians)Returns a new S2LatLng specified in radians.S2LatLngS2LatLngRectBase. getCenter()Returns the center of the rectangle in latitude-longitude space (in general this is not the center of the region on the sphere).S2LatLngS2LatLngRectBase. getSize()Returns the width and height of this rectangle in latitude-longitude space.S2LatLngS2LatLngRectBase. getVertex(int k)Returns the kth vertex of the rectangle (k = 0,1,2,3) in CCW order (lower-left, lower right, upper right, upper left).S2LatLngS2LatLngRectBase. hi()S2LatLngS2LatLngRectBase. lo()static S2LatLngS2TextFormat. makeLatLng(String str)As above, but does not CHECK-fail on invalid input.static S2LatLngS2TextFormat. makeLatLngOrDie(String str)Given a string in the same format as ParseLatLngs, returns a single S2LatLng.S2LatLngS2LatLng. mul(double m)Scales this point by the given scaling factor.S2LatLngS2LatLng. normalized()Returns a new S2LatLng based on this instance for whichisValid()will betrue.S2LatLngS2LatLng. sub(S2LatLng o)Subtracts the given point from this point.S2LatLngS2CellId. toLatLng()Return the S2LatLng corresponding to the center of the given cell.Methods in com.google.common.geometry that return types with arguments of type S2LatLng Modifier and Type Method Description static List<S2LatLng>S2TextFormat. parseLatLngsOrDie(String str)Parses a string of one or more latitude-longitude coordinates in degrees, and return the corresponding List of S2LatLng points.Methods in com.google.common.geometry with parameters of type S2LatLng Modifier and Type Method Description S2LatLngS2LatLng. add(S2LatLng o)Adds the given point to this point.voidS2EdgeUtil.RectBounder. addPoint(S2LatLng b)This method is called to add each vertex to the chain.S2LatLngRectS2LatLngRect. addPoint(S2LatLng ll)Returns a new rectangle that includes this rectangle and the given S2LatLng, expanding this rectangle to include the point by the minimum amount possible.S2LatLngRect.BuilderS2LatLngRect.Builder. addPoint(S2LatLng ll)Increases the size of the bounding rectangle to include the given point.booleanS2LatLng. approxEquals(S2LatLng o)Returns true if the given point is within1e-9radians of this point.booleanS2LatLng. approxEquals(S2LatLng o, double maxError)Returns true if both the latitude and longitude of the given point are withinmaxErrorradians of this point.booleanS2LatLngRectBase. approxEquals(S2LatLngRectBase other, S2LatLng maxError)AsS2LatLngRectBase.approxEquals(S2LatLngRectBase, double), but with separate tolerances for latitude and longitude.booleanS2LatLngRectBase. contains(S2LatLng ll)More efficient version of contains() that accepts a S2LatLng rather than an S2Point.S2LatLngRect.BuilderS2LatLngRect.Builder. expanded(S2LatLng margin)Mutates the rectangle to contain all points whose latitude distance from this rectangle is at most margin.lat(), and whose longitude distance from this rectangle is at most margin.lng().S2LatLngRectS2LatLngRect. expanded(S2LatLng margin)Returns a rectangle that contains all points whose latitude distance from this rectangle is at most margin.lat(), and whose longitude distance from this rectangle is at most margin.lng().static S2LatLngRectS2LatLngRect. fromCenterSize(S2LatLng center, S2LatLng size)Constructs a rectangle of the given size centered around the given point.static S2CellIdS2CellId. fromLatLng(S2LatLng ll)Return the leaf cell containing the given S2LatLng.static S2LatLngRectS2LatLngRect. fromPoint(S2LatLng p)Convenience method to construct a rectangle containing a single point.static S2LatLngRectS2LatLngRect. fromPointPair(S2LatLng p1, S2LatLng p2)Convenience method to construct the minimal bounding rectangle containing the two given normalized points.S1AngleS2LatLng. getDistance(S2LatLng o)Return the distance (measured along the surface of the sphere) to the given point.doubleS2LatLng. getDistance(S2LatLng o, double radius)Returns the surface distance to the given point assuming a constant radius.S1AngleS2LatLngRectBase. getDistance(S2LatLng p)Returns the minimum distance (measured along the surface of the sphere) from a given point to the rectangle (both its boundary and its interior).booleanS2LatLngRectBase. interiorContains(S2LatLng ll)More efficient version of interiorContains() that accepts a S2LatLng rather than an S2Point.S2LatLngS2LatLng. sub(S2LatLng o)Subtracts the given point from this point.static StringS2TextFormat. toString(S2LatLng latlng)Convert an S2LatLng to the S2TextFormat string representation documented above.Method parameters in com.google.common.geometry with type arguments of type S2LatLng Modifier and Type Method Description static StringS2TextFormat. s2LatLngsToString(List<S2LatLng> latlngs)Convert a list of S2LatLngs to the S2TextFormat string representation documented above.Constructors in com.google.common.geometry with parameters of type S2LatLng Constructor Description Builder(S2LatLng lo, S2LatLng hi)S2Cell(S2LatLng ll)S2LatLngRect(S2LatLng lo, S2LatLng hi)Constructs a rectangle from minimum and maximum latitudes and longitudes.
-