Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mvtm-dn/shpfile
Simple ESRI SHP file to GeoJSON convertor
https://github.com/mvtm-dn/shpfile
esri-shp geojson parsed-shapes parsing shapefile
Last synced: 26 days ago
JSON representation
Simple ESRI SHP file to GeoJSON convertor
- Host: GitHub
- URL: https://github.com/mvtm-dn/shpfile
- Owner: mvtm-dn
- License: mit
- Created: 2017-12-21T03:58:43.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-23T07:13:19.000Z (about 6 years ago)
- Last Synced: 2024-11-11T19:42:41.576Z (3 months ago)
- Topics: esri-shp, geojson, parsed-shapes, parsing, shapefile
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# shpFile
Very simple ESRI SHP file to GeoJSON convertor. In fact parse subset of ESRI SHP. Now parsed next type of shapes:
* 0 Null shape
* 1 Point
* 3 PolyLine
* 5 Polygon
* 8 MultiPoint
* 11 PointZ
* 15 PolygonZ# Installation
```
npm install --save https://github.com/mvtm-dn/shpFile.git
```# usage
Example of usage:
```
const shapeFile=require("shpFile");let geoJSONs=[];
shapeFile(filename).on("error",(error)=>{
console.log("Error open %s - %s",filename,error);
})
.on("end",(shapes)=>{
console.log("Got %d shape(s)",shapes.length);
for(let i=0;i