Package com.mapbox.turf
Class TurfAssertions
java.lang.Object
com.mapbox.turf.TurfAssertions
Also called Assertions, these methods enforce expectations of a certain type or calculate various
shapes from given points.
- Since:
- 1.2.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcollectionOf(com.mapbox.geojson.FeatureCollection featureCollection, String type, String name) Enforce expectations about types ofFeatureCollectioninputs for Turf.static voidEnforce expectations about types ofFeatureinputs for Turf.static voidgeojsonType(com.mapbox.geojson.GeoJson value, String type, String name) Enforce expectations about types of GeoJson objects for Turf.static com.mapbox.geojson.PointgetCoord(com.mapbox.geojson.Feature obj) Deprecated.
-
Method Details
-
getCoord
Deprecated.Unwrap a coordinatePointfrom a Feature with a Point geometry.- Parameters:
obj- any value- Returns:
- a coordinate
- Since:
- 1.2.0
- See Also:
-
geojsonType
Enforce expectations about types of GeoJson objects for Turf.- Parameters:
value- any GeoJson objecttype- expected GeoJson typename- name of calling function- Since:
- 1.2.0
- See Also:
-
featureOf
Enforce expectations about types ofFeatureinputs for Turf. Internally this usesFeature.type()to judge geometry types.- Parameters:
feature- with an expected geometry typetype- type expected GeoJson typename- name of calling function- Since:
- 1.2.0
- See Also:
-
collectionOf
public static void collectionOf(com.mapbox.geojson.FeatureCollection featureCollection, String type, String name) Enforce expectations about types ofFeatureCollectioninputs for Turf. Internally this usesFeature.type()} to judge geometry types.- Parameters:
featureCollection- for which features will be judgedtype- expected GeoJson typename- name of calling function- Since:
- 1.2.0
- See Also:
-
TurfMeta.getCoord(Feature)