rfc7946-to-d3
v1.0.1
Published
Converts rfc7946 geojson polygons to d3 compatible ones: d3 requires clockwise winding whereas rfc7946 specifies the opposite. See https://github.com/d3/d3-geo/pull/79
Downloads
187
Readme
rfc7946-to-d3
Converts rfc7946 geojson polygons to d3 compatible ones: d3 requires clockwise winding order whereas rfc7946 specifies the opposite. See also https://github.com/d3/d3-geo/pull/79.
Usage
- as npm module
install:
npm install --save rfc7946-to-d3
api:
A function that takes in rfc7946 geojson and spits out d3 compatible geojson (input is modified in place!).
- as cli utility
install:
[sudo] npm install -g rfc7946-to-d3
use:
rfc7946-to-d3 < rfc7946.geojson > d3.geojson
See also
- geojson-rewind a module that enforces geojson polygon ring winding order.