coordAll
Description
Get all coordinates from any GeoJSON object.
Parameters
Name | Type | Description |
---|---|---|
geojson | FeatureCollection | Feature | Geometry | any GeoJSON object |
Returns
Array<Array<number>> coordinate position array
Examples
var features = turf.featureCollection([
turf.point([26, 37], { foo: "bar" }),
turf.point([36, 53], { hello: "world" }),
]);
var coords = turf.coordAll(features);
//= [[26, 37], [36, 53]]
Installation
$ npm install @turf/meta
import { coordAll } from "@turf/meta";
const result = coordAll(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.coordAll(...);