Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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