Skip to content

Instantly share code, notes, and snippets.

@jkeefe
Created July 12, 2023 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkeefe/583c051b27ffe1b76fbafbb184bac3cd to your computer and use it in GitHub Desktop.
Save jkeefe/583c051b27ffe1b76fbafbb184bac3cd to your computer and use it in GitHub Desktop.
Importing mapshaper in ES6
// npm install mapshaper --save
import mapshaper from 'mapshaper'
// Example: converting a directory of Shapefiles to GeoJSON
mapshaper.runCommands('-i shapefiles/*.shp -o geojson/ format=geojson');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment