For node.js or browserify
npm install --save shp-write
Or in a browser
var shpwrite = ;// (optional) set names for feature types and zipped foldervar options =folder: 'myshapes'types:point: 'mypoints'polygon: 'mypolygons'line: 'mylines'// a GeoJSON bridge for featuresshpwrite;// triggers a download of a zip file with shapefiles contained within.
Given a GeoJSON FeatureCollection as an object, converts convertible features into Shapefiles and triggers a download.
Given data, an array of objects for each row of data, geometry, the OGC standard
geometry type (like
POINT), geometries, a list of geometries as bare coordinate
arrays, generate a shapfile and call the callback with
err and an object with
Generate a ArrayBuffer of a zipped shapefile, dbf, and prj, from a GeoJSON object.