I am looking for JavaScript options that allow me to take a set of shapefiles (the .shp, .shx, .dbf, and what ever other related files) and convert them into geoJSON.
I am then going to take this geoJSON and save it to the database.
I have found a number of options:
1) https://github.com/wavded/js-shapefile-to-geojson
2) https://www.npmjs.com/package/shapefile
I believe number 2 is my best option but I can't seem to confirm that it will allow me to give it more than one shapefile to convert to geoJSON. Do you know of any libraries that allow for multiple shapefile types to be used as input at one time?
.shp
,.shx
,.dbf
, etc are part of the same shapefile. Most tools expect you to point to the.shp
and will then look for the remaining files in the same directory (because not all of them are required). The different parts must have the same name (only different in their file extension).