Skip to content

Commit 2f3ba8d

Browse files
authored
deprecate TurfAssertions.getCoord() instead of removing it (#825)
1 parent c6cbe31 commit 2f3ba8d

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

services-turf/src/main/java/com/mapbox/turf/TurfAssertions.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.mapbox.geojson.FeatureCollection;
55
import com.mapbox.geojson.GeoJson;
66
import com.mapbox.core.utils.TextUtils;
7+
import com.mapbox.geojson.Point;
78

89
/**
910
* Also called Assertions, these methods enforce expectations of a certain type or calculate various
@@ -18,6 +19,20 @@ private TurfAssertions() {
1819
// Private constructor preventing initialization of this class
1920
}
2021

22+
/**
23+
* Unwrap a coordinate {@link Point} from a Feature with a Point geometry.
24+
*
25+
* @param obj any value
26+
* @return a coordinate
27+
* @see <a href="http://turfjs.org/docs/#getcoord">Turf getCoord documentation</a>
28+
* @since 1.2.0
29+
* @deprecated use {@link TurfMeta#getCoord(Feature)}
30+
*/
31+
@Deprecated
32+
public static Point getCoord(Feature obj) {
33+
return TurfMeta.getCoord(obj);
34+
}
35+
2136
/**
2237
* Enforce expectations about types of GeoJson objects for Turf.
2338
*

0 commit comments

Comments
 (0)