turf_helpers library

Classes

BBox
Please make sure, you arrange your parameters like this: Longitude 1, Latitude 1, Altitude 1 (optional), Longitude 2, Latitude 2, Altitude 2 (optional) You can either specify 4 or 6 parameters
CoordinateType
Coordinate types, following https://tools.ietf.org/html/rfc7946#section-4
Feature<T extends Geometry>
Feature, as specified here https://tools.ietf.org/html/rfc7946#section-3.2
FeatureCollection<T extends Geometry>
FeatureCollection, as specified here https://tools.ietf.org/html/rfc7946#section-3.3
GeoJSONObject
GeoJSONObjectTypes
Geometry
GeometryCollection
GeometryCollection, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.8
GeometryType<T>
LineString
LineString, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.4
MultiLineString
MultiLineString, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.5
MultiPoint
MultiPoint, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.3
MultiPolygon
MultiPolygon, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.7
Point
Point, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.2
Polygon
Polygon, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.6
Position
Please make sure, you arrange your parameters like this: [...]

Constants

areaFactors → const Map<Unit, num>
<Unit, num>{Unit.acres : 0.000247105, Unit.centimeters : 10000, Unit.feet : 10.763910417, Unit.inches : 1550.003100006, Unit.kilometers : 0.000001, Unit.meters : 1, Unit.miles : 3.86e-7, Unit.mi…
earthRadius → const double
6371008.8
factors → const Map<Unit, num>
<Unit, num>{Unit.centimeters : earthRadius * 100, Unit.degrees : earthRadius / 111325, Unit.feet : earthRadius * 3.28084, Unit.inches : earthRadius * 39.370, Unit.kilometers : earthRadius &#…
unitsFactors → const Map<Unit, num>
<Unit, num>{Unit.centimeters : 100, Unit.degrees : 1 / 111325, Unit.feet : 3.28084, Unit.inches : 39.370, Unit.kilometers : 1 / 1000, Unit.meters : 1, Unit.miles : 1 / 1609.344, Unit…

Functions

bearingToAzimuth(num bearing) num
convertArea(num area, [dynamic originalUnit = Unit.meters, dynamic finalUnit = Unit.kilometers]) num
convertLength(num length, [Unit originalUnit = Unit.kilometers, Unit finalUnit = Unit.kilometers]) num
degreesToRadians(num degrees) num
lengthToDegrees(num distance, [Unit unit = Unit.kilometers]) num
lengthToRadians(num distance, [Unit unit = Unit.kilometers]) num
radiansToDegrees(num radians) num
radiansToLength(num radians, [Unit unit = Unit.kilometers]) num
round(dynamic value, [dynamic precision = 0]) num

Enums

Corner
Grid
Unit