public final class TurfTransformation
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static com.mapbox.geojson.Polygon |
circle(com.mapbox.geojson.Point center,
double radius)
Takes a
Point and calculates the circle polygon given a radius in degrees, radians,
miles, or kilometers; and steps for precision. |
static com.mapbox.geojson.Polygon |
circle(com.mapbox.geojson.Point center,
double radius,
int steps,
java.lang.String units)
Takes a
Point and calculates the circle polygon given a radius in the
provided TurfConstants.TurfUnitCriteria; and steps for precision. |
static com.mapbox.geojson.Polygon |
circle(com.mapbox.geojson.Point center,
double radius,
java.lang.String units)
Takes a
Point and calculates the circle polygon given a radius in the
provided TurfConstants.TurfUnitCriteria; and steps for precision. |
static java.util.List<com.mapbox.geojson.Point> |
simplify(java.util.List<com.mapbox.geojson.Point> original)
Simplifies provided list of coordinates points into a shorter list of coordinates.
|
static java.util.List<com.mapbox.geojson.Point> |
simplify(java.util.List<com.mapbox.geojson.Point> original,
boolean highQuality)
Simplifies provided list of coordinates points into a shorter list of coordinates.
|
static java.util.List<com.mapbox.geojson.Point> |
simplify(java.util.List<com.mapbox.geojson.Point> original,
double tolerance)
Simplifies provided list of coordinates points into a shorter list of coordinates.
|
static java.util.List<com.mapbox.geojson.Point> |
simplify(java.util.List<com.mapbox.geojson.Point> original,
double tolerance,
boolean highQuality)
Simplifies provided list of coordinates points into a shorter list of coordinates.
|
public static com.mapbox.geojson.Polygon circle(@NonNull
com.mapbox.geojson.Point center,
double radius)
Point and calculates the circle polygon given a radius in degrees, radians,
miles, or kilometers; and steps for precision. This uses the DEFAULT_STEPS and
TurfConstants.UNIT_DEFAULT values.center - a Point which the circle will center aroundradius - the radius of the circlePolygon which represents the newly created circlepublic static com.mapbox.geojson.Polygon circle(@NonNull
com.mapbox.geojson.Point center,
double radius,
java.lang.String units)
Point and calculates the circle polygon given a radius in the
provided TurfConstants.TurfUnitCriteria; and steps for precision. This
method uses the DEFAULT_STEPS.center - a Point which the circle will center aroundradius - the radius of the circleunits - one of the units found inside TurfConstants.TurfUnitCriteriaPolygon which represents the newly created circlepublic static com.mapbox.geojson.Polygon circle(@NonNull
com.mapbox.geojson.Point center,
double radius,
int steps,
java.lang.String units)
Point and calculates the circle polygon given a radius in the
provided TurfConstants.TurfUnitCriteria; and steps for precision.center - a Point which the circle will center aroundradius - the radius of the circlesteps - number of steps which make up the circle parameterunits - one of the units found inside TurfConstants.TurfUnitCriteriaPolygon which represents the newly created circle@NonNull
public static java.util.List<com.mapbox.geojson.Point> simplify(@NonNull
java.util.List<com.mapbox.geojson.Point> original)
original - the coordinates to simplify@NonNull
public static java.util.List<com.mapbox.geojson.Point> simplify(@NonNull
java.util.List<com.mapbox.geojson.Point> original,
double tolerance)
original - the coordinates to simplifytolerance - tolerance in the same measurement as the point coordinates@NonNull
public static java.util.List<com.mapbox.geojson.Point> simplify(@NonNull
java.util.List<com.mapbox.geojson.Point> original,
boolean highQuality)
original - the coordinates to simplifyhighQuality - true for using Douglas-Peucker, false for Radial-Distance algorithm@NonNull
public static java.util.List<com.mapbox.geojson.Point> simplify(@NonNull
java.util.List<com.mapbox.geojson.Point> original,
double tolerance,
boolean highQuality)
original - the coordinates to simplifytolerance - tolerance in the same measurement as the point coordinateshighQuality - true for using Douglas-Peucker, false for Radial-Distance algorithm