@Test public void explodeMultiLineStringSingleFeature() throws NullPointerException { MultiLineString multiLineString = MultiLineString.fromJson(loadJsonFixture(TURF_EXPLODE_MULTILINESTRING)); assertEquals(4, TurfConversion.explode(Feature.fromGeometry(multiLineString)).features().size()); }
public static FeatureCollection explode(@NonNull FeatureCollection featureCollection) { List<Feature> finalFeatureList = new ArrayList<>(); for (Point singlePoint : TurfMeta.coordAll(featureCollection, true)) { finalFeatureList.add(Feature.fromGeometry(singlePoint)); } return FeatureCollection.fromFeatures(finalFeatureList); }
TurfConversion { public static FeatureCollection explode(@NonNull FeatureCollection featureCollection) { List<Feature> finalFeatureList = new ArrayList<>(); for (Point singlePoint : TurfMeta.coordAll(featureCollection, true)) { finalFeatureList.add(Feature.fromGeometry(singlePoint)); } return FeatureCollection.fromFeatures(finalFeatureList); } }
TurfConversion { public static FeatureCollection explode(@NonNull FeatureCollection featureCollection) { List<Feature> finalFeatureList = new ArrayList<>(); for (Point singlePoint : TurfMeta.coordAll(featureCollection, true)) { finalFeatureList.add(Feature.fromGeometry(singlePoint)); } return FeatureCollection.fromFeatures(finalFeatureList); } private  TurfConversion(); }
TurfConversion { public static FeatureCollection explode(@NonNull FeatureCollection featureCollection) { List<Feature> finalFeatureList = new ArrayList<>(); for (Point singlePoint : TurfMeta.coordAll(featureCollection, true)) { finalFeatureList.add(Feature.fromGeometry(singlePoint)); } return FeatureCollection.fromFeatures(finalFeatureList); } private  TurfConversion(); static double lengthToDegrees(double distance, @TurfUnitCriteria String units); static double degreesToRadians(double degrees); static double radiansToDegrees(double radians); static double radiansToLength(double radians); static double radiansToLength(double radians, @NonNull @TurfUnitCriteria String units); static double lengthToRadians(double distance); static double lengthToRadians(double distance, @NonNull @TurfUnitCriteria String units); static double convertLength(@FloatRange(from = 0) double distance,
                                     @NonNull @TurfUnitCriteria String originalUnit); static double convertLength(@FloatRange(from = 0) double distance,
                                     @NonNull @TurfUnitCriteria String originalUnit,
                                     @Nullable @TurfUnitCriteria String finalUnit); static FeatureCollection explode(@NonNull FeatureCollection featureCollection); static FeatureCollection explode(@NonNull Feature feature); static Feature polygonToLine(@NonNull Feature feature); static Feature polygonToLine(@NonNull Feature feature, @Nullable JsonObject properties); static Feature polygonToLine(@NonNull Polygon polygon); static FeatureCollection polygonToLine(@NonNull MultiPolygon multiPolygon); static Feature polygonToLine(@NonNull Polygon polygon, @Nullable JsonObject properties); static FeatureCollection polygonToLine(@NonNull MultiPolygon multiPolygon,
                                                @Nullable JsonObject properties); static FeatureCollection multiPolygonToLine(@NonNull Feature feature); static FeatureCollection multiPolygonToLine(@NonNull Feature feature,
                                                     @Nullable JsonObject properties); static FeatureCollection combine(@NonNull FeatureCollection originalFeatureCollection); }
TurfConversion { public static FeatureCollection explode(@NonNull FeatureCollection featureCollection) { List<Feature> finalFeatureList = new ArrayList<>(); for (Point singlePoint : TurfMeta.coordAll(featureCollection, true)) { finalFeatureList.add(Feature.fromGeometry(singlePoint)); } return FeatureCollection.fromFeatures(finalFeatureList); } private  TurfConversion(); static double lengthToDegrees(double distance, @TurfUnitCriteria String units); static double degreesToRadians(double degrees); static double radiansToDegrees(double radians); static double radiansToLength(double radians); static double radiansToLength(double radians, @NonNull @TurfUnitCriteria String units); static double lengthToRadians(double distance); static double lengthToRadians(double distance, @NonNull @TurfUnitCriteria String units); static double convertLength(@FloatRange(from = 0) double distance,
                                     @NonNull @TurfUnitCriteria String originalUnit); static double convertLength(@FloatRange(from = 0) double distance,
                                     @NonNull @TurfUnitCriteria String originalUnit,
                                     @Nullable @TurfUnitCriteria String finalUnit); static FeatureCollection explode(@NonNull FeatureCollection featureCollection); static FeatureCollection explode(@NonNull Feature feature); static Feature polygonToLine(@NonNull Feature feature); static Feature polygonToLine(@NonNull Feature feature, @Nullable JsonObject properties); static Feature polygonToLine(@NonNull Polygon polygon); static FeatureCollection polygonToLine(@NonNull MultiPolygon multiPolygon); static Feature polygonToLine(@NonNull Polygon polygon, @Nullable JsonObject properties); static FeatureCollection polygonToLine(@NonNull MultiPolygon multiPolygon,
                                                @Nullable JsonObject properties); static FeatureCollection multiPolygonToLine(@NonNull Feature feature); static FeatureCollection multiPolygonToLine(@NonNull Feature feature,
                                                     @Nullable JsonObject properties); static FeatureCollection combine(@NonNull FeatureCollection originalFeatureCollection);  }