points
Description
Creates a Point FeatureCollection from an Array of Point coordinates.
Parameters
Name | Type | Description |
---|---|---|
coordinates | Array<Array<number>> | an array of Points |
properties? | Object | Translate these properties to each Feature (default {}) |
options? | Object | Optional Parameters (default {}) |
options.bbox? | Array<number> | Bounding Box Array [west, south, east, north] associated with the FeatureCollection |
options.id? | string | number | Identifier associated with the FeatureCollection |
Returns
FeatureCollection<Point> Point Feature
Examples
var points = turf.points([
[-75, 39],
[-80, 45],
[-78, 50],
]);
//=points
Installation
$ npm install @turf/helpers
import { points } from "@turf/helpers";
const result = points(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.points(...);