@Test public void convertDistance() throws TurfException { assertEquals(1, TurfConversion.convertLength(1000, TurfConstants.UNIT_METERS), DELTA); assertEquals(0.6213714106386318, TurfConversion.convertLength(1, TurfConstants.UNIT_KILOMETERS, TurfConstants.UNIT_MILES), DELTA); assertEquals(1.6093434343434343, TurfConversion.convertLength(1, TurfConstants.UNIT_MILES, TurfConstants.UNIT_KILOMETERS), DELTA); assertEquals(1.851999843075488, TurfConversion.convertLength(1, TurfConstants.UNIT_NAUTICAL_MILES), DELTA); assertEquals(100, TurfConversion.convertLength(1, TurfConstants.UNIT_METERS, TurfConstants.UNIT_CENTIMETERS), DELTA); }
public static double convertLength(@FloatRange(from = 0) double distance, @NonNull @TurfUnitCriteria String originalUnit) { return convertLength(distance, originalUnit, TurfConstants.UNIT_DEFAULT); }
TurfConversion { public static double convertLength(@FloatRange(from = 0) double distance, @NonNull @TurfUnitCriteria String originalUnit) { return convertLength(distance, originalUnit, TurfConstants.UNIT_DEFAULT); } }
TurfConversion { public static double convertLength(@FloatRange(from = 0) double distance, @NonNull @TurfUnitCriteria String originalUnit) { return convertLength(distance, originalUnit, TurfConstants.UNIT_DEFAULT); } private  TurfConversion(); }
TurfConversion { public static double convertLength(@FloatRange(from = 0) double distance, @NonNull @TurfUnitCriteria String originalUnit) { return convertLength(distance, originalUnit, TurfConstants.UNIT_DEFAULT); } 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 double convertLength(@FloatRange(from = 0) double distance, @NonNull @TurfUnitCriteria String originalUnit) { return convertLength(distance, originalUnit, TurfConstants.UNIT_DEFAULT); } 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);  }