GEOMETRYLENGTH

Takes a GeoJSON and measures its length in the specified units.

Parameters

geojson GeoJSON (required) - geojson to measure

options object - options

Returns

number - returns the length of the feature

Examples

const line = GEOMETRYLINESTRING([[115, -32], [131, -22], [143, -25], [150, -34]]);

GEOMETRYLENGTH(line, { units: 'miles' });

// returns
// 2738.9663893575207