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 private S2LatLng
S2EdgeUtil.RectBounder. aLatLng
The corresponding latitude-longitude.static S2LatLng
S2LatLng. CENTER
The center point the lat/lng coordinate system.Methods in com.google.common.geometry that return S2LatLng Modifier and Type Method Description S2LatLng
S2LatLng. add(S2LatLng o)
Adds the given point to this point.static S2LatLng
S2LatLng. fromDegrees(double latDegrees, double lngDegrees)
Returns a new S2LatLng converted from degrees.static S2LatLng
S2LatLng. fromE5(int latE5, int lngE5)
Returns a new S2LatLng converted from tens of microdegrees.static S2LatLng
S2LatLng. fromE6(int latE6, int lngE6)
Returns a new S2LatLng converted from microdegrees.static S2LatLng
S2LatLng. fromE7(int latE7, int lngE7)
Returns a new S2LatLng converted from tenths of a microdegree.static S2LatLng
S2LatLng. fromRadians(double latRadians, double lngRadians)
Returns a new S2LatLng specified in radians.S2LatLng
S2LatLngRectBase. getCenter()
Returns the center of the rectangle in latitude-longitude space (in general this is not the center of the region on the sphere).S2LatLng
S2LatLngRectBase. getSize()
Returns the width and height of this rectangle in latitude-longitude space.S2LatLng
S2LatLngRectBase. 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).S2LatLng
S2LatLngRectBase. hi()
S2LatLng
S2LatLngRectBase. lo()
static S2LatLng
S2TextFormat. makeLatLng(java.lang.String str)
As above, but does not CHECK-fail on invalid input.static S2LatLng
S2TextFormat. makeLatLngOrDie(java.lang.String str)
Given a string in the same format as ParseLatLngs, returns a single S2LatLng.(package private) static S2LatLng
S2EdgeUtil.RectBounder. maxErrorForTests()
Returns the maximum error in getBound() provided that the result does not include either pole.S2LatLng
S2LatLng. mul(double m)
Scales this point by the given scaling factor.S2LatLng
S2LatLng. normalized()
Returns a new S2LatLng based on this instance for whichisValid()
will betrue
.S2LatLng
S2LatLng. sub(S2LatLng o)
Subtracts the given point from this point.S2LatLng
S2CellId. 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 (package private) static java.util.List<S2LatLng>
S2TextFormat. parseLatLngs(java.lang.String str)
As above, but does not CHECK-fail on invalid input.static java.util.List<S2LatLng>
S2TextFormat. parseLatLngsOrDie(java.lang.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 S2LatLng
S2LatLng. add(S2LatLng o)
Adds the given point to this point.void
S2EdgeUtil.RectBounder. addPoint(S2LatLng b)
This method is called to add each vertex to the chain.private void
S2EdgeUtil.RectBounder. addPoint(S2Point b, S2LatLng bLatLng)
Internal implementation of addPoint that takes both the point and latLng representation, by whichever path provided them, and expands the bounds accordingly.S2LatLngRect
S2LatLngRect. 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.Builder
S2LatLngRect.Builder. addPoint(S2LatLng ll)
Increases the size of the bounding rectangle to include the given point.private static void
S2TextFormat. appendVertex(S2LatLng ll, java.lang.StringBuilder out)
boolean
S2LatLng. approxEquals(S2LatLng o)
Returns true if the given point is within1e-9
radians of this point.boolean
S2LatLng. approxEquals(S2LatLng o, double maxError)
Returns true if both the latitude and longitude of the given point are withinmaxError
radians of this point.boolean
S2LatLngRectBase. approxEquals(S2LatLngRectBase other, S2LatLng maxError)
AsS2LatLngRectBase.approxEquals(S2LatLngRectBase, double)
, but with separate tolerances for latitude and longitude.boolean
S2LatLngRectBase. contains(S2LatLng ll)
More efficient version of contains() that accepts a S2LatLng rather than an S2Point.S2LatLngRect.Builder
S2LatLngRect.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().S2LatLngRect
S2LatLngRect. 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 S2LatLngRect
S2LatLngRect. fromCenterSize(S2LatLng center, S2LatLng size)
Constructs a rectangle of the given size centered around the given point.static S2CellId
S2CellId. fromLatLng(S2LatLng ll)
Return the leaf cell containing the given S2LatLng.static S2LatLngRect
S2LatLngRect. fromPoint(S2LatLng p)
Convenience method to construct a rectangle containing a single point.static S2LatLngRect
S2LatLngRect. fromPointPair(S2LatLng p1, S2LatLng p2)
Convenience method to construct the minimal bounding rectangle containing the two given normalized points.S1Angle
S2LatLng. getDistance(S2LatLng o)
Return the distance (measured along the surface of the sphere) to the given point.double
S2LatLng. getDistance(S2LatLng o, double radius)
Returns the surface distance to the given point assuming a constant radius.S1Angle
S2LatLngRectBase. 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).boolean
S2LatLngRectBase. interiorContains(S2LatLng ll)
More efficient version of interiorContains() that accepts a S2LatLng rather than an S2Point.S2LatLng
S2LatLng. sub(S2LatLng o)
Subtracts the given point from this point.static java.lang.String
S2TextFormat. 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 java.lang.String
S2TextFormat. s2LatLngsToString(java.util.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.S2LatLngRectBase(S2LatLng lo, S2LatLng hi)
Constructs a rectangle from minimum and maximum latitudes and longitudes.
-