turf-normalize
Turf normalize module
turf.normalize(input)
Normalizes any GeoJSON to a FeatureCollection using geojson-normalize.
Parameters
parameter | type | description |
---|---|---|
input |
geojson | any valid GeoJSON |
Example
var geometry = "type": "Polygon" "coordinates": -70603637 -33399918 -70614624 -33395332 -70639343 -33392466 -70659942 -33394759 -70683975 -33404504 -70697021 -33419406 -70701141 -33434306 -70700454 -33446339 -70694274 -33458369 -70682601 -33465816 -70668869 -33472117 -70646209 -33473835 -70624923 -33472117 -70609817 -33468107 -70595397 -33458369 -70587158 -33442901 -70587158 -33426283 -70590591 -33414248 -70594711 -33406224 -70603637 -33399918 ; // wraps the geometry in a Feature and places it in a FeatureCollectionvar normalized = turf //=normalized
Returns normalized
, a normalized FeatureCollection
Installation
Requires nodejs.
$ npm install turf-normalize
Tests
$ npm test