Skip to main content
Version: Next

points

Description

Creates a Point FeatureCollection from an Array of Point coordinates.

Parameters

NameTypeDescription
coordinatesArray<Position>an array of Points
properties?GeoJsonPropertiesTranslate these properties to each Feature (default {})
options?ObjectOptional Parameters (default {})
options.bbox?BBoxBounding Box Array [west, south, east, north] associated with the FeatureCollection
options.id?IdIdentifier 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(...);