Adds the given point to this point.
S2LatLng.fromDegrees(double latDegrees,
double lngDegrees)
Returns a new S2LatLng converted from degrees.
S2LatLng.fromE5(int latE5,
int lngE5)
Returns a new S2LatLng converted from tens of microdegrees.
S2LatLng.fromE6(int latE6,
int lngE6)
Returns a new S2LatLng converted from microdegrees.
S2LatLng.fromE7(int latE7,
int lngE7)
Returns a new S2LatLng converted from tenths of a microdegree.
S2LatLng.fromRadians(double latRadians,
double lngRadians)
Returns a new S2LatLng specified in radians.
Returns the center of the rectangle in latitude-longitude space (in general this is not the
center of the region on the sphere).
Returns the width and height of this rectangle in latitude-longitude space.
Returns the kth vertex of the rectangle (k = 0,1,2,3) in CCW order (lower-left,
lower right, upper right, upper left).
As above, but does not CHECK-fail on invalid input.
Given a string in the same format as ParseLatLngs, returns a single S2LatLng.
Returns the maximum error in getBound() provided that the result does not include either
pole.
Scales this point by the given scaling factor.
Returns a new S2LatLng based on this instance for which
isValid()
will be
true
.
Subtracts the given point from this point.
Return the S2LatLng corresponding to the center of the given cell.
Adds the given point to this point.
void
This method is called to add each vertex to the chain.
private void
Internal implementation of addPoint that takes both the point and latLng representation, by
whichever path provided them, and expands the bounds accordingly.
Returns a new rectangle that includes this rectangle and the given S2LatLng, expanding this
rectangle to include the point by the minimum amount possible.
Increases the size of the bounding rectangle to include the given point.
private static void
boolean
Returns true if the given point is within 1e-9
radians of this point.
boolean
Returns true if both the latitude and longitude of the given point are within maxError
radians of this point.
final boolean
final boolean
More efficient version of contains() that accepts a S2LatLng rather than an S2Point.
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().
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().
Constructs a rectangle of the given size centered around the given point.
Return the leaf cell containing the given S2LatLng.
Convenience method to construct a rectangle containing a single point.
Convenience method to construct the minimal bounding rectangle containing the two given
normalized points.
Return the distance (measured along the surface of the sphere) to the given point.
double
Returns the surface distance to the given point assuming a constant radius.
Returns the minimum distance (measured along the surface of the sphere) from a given point to
the rectangle (both its boundary and its interior).
final boolean
More efficient version of interiorContains() that accepts a S2LatLng rather than an S2Point.
Subtracts the given point from this point.
Convert an S2LatLng to the S2TextFormat string representation documented above.