Skip to main content
Version: 6.5.0

points

Description

Creates a Point FeatureCollection from an Array of Point coordinates.

Parameters

NameTypeDescription
coordinatesArray<Array<number>>an array of Points
properties?ObjectTranslate these properties to each Feature (default {})
options?ObjectOptional Parameters (default {})
options.bbox?Array<number>Bounding Box Array [west, south, east, north] associated with the FeatureCollection
options.id?string | numberIdentifier associated with the FeatureCollection

Returns

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(...);