point
Description
Creates a Point Feature from a Position.
Parameters
Name | Type | Description |
---|---|---|
coordinates | Array<number> | longitude, latitude position (each in decimal degrees) |
properties? | Object | an Object of key-value pairs to add as properties (default {}) |
options? | Object | Optional Parameters (default {}) |
options.bbox? | Array<number> | Bounding Box Array [west, south, east, north] associated with the Feature |
options.id? | string | number | Identifier associated with the Feature |
Returns
Examples
var point = turf.point([-75.343, 39.984]);
//=point
Installation
$ npm install @turf/helpers
import { point } from "@turf/helpers";
const result = point(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.point(...);