geojson-properties
v0.2.0
Published
An easy way to get or replace properties of GeoJSON features.
Downloads
3
Readme
geojson-properties
An easy way to get or replace properties of GeoJSON features.
Install
$ npm install geojson-properties
Usage
const geo = require('geojson-properties');
geo.getProperties(someGeoJSON);
//=> [{id: "01", value: "blue"}, {id: "02", value: "red"}]
API
.getProperties(geoJSON)
geoJSON
Type: GeoJSON
Must be a FeatureCollection.
.replaceProperties(geoJSON, data, key)
geoJSON
Type: GeoJSON
Must be a FeatureCollection.
data
Type: array
An array of properties (Objects).
key
Type: string
A key value used to merge both data and GeoJSON.
License
MIT © Guilherme Serradilha