points
Description
Creates a Point FeatureCollection from an Array of Point coordinates.
Parameters
Name | Type | Description |
---|---|---|
coordinates | Array<Position> | an array of Points |
properties? | GeoJsonProperties | Translate these properties to each Feature (default {}) |
options? | Object | Optional Parameters (default {}) |
options.bbox? | BBox | Bounding Box Array [west, south, east, north] associated with the FeatureCollection |
options.id? | Id | 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(...);