Skip to content

Baki92/node-shp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

balazs-node-shp

Node.js shapefile parser in pure JS

##What about shp2json?

Unlike substack's shp2json, this library does not require gdal. Or anything other than fs.

Usage

still in testing stages

> npm install balazs-shp

var Shp = require('balazs-shp');
var shpJson = Shp.readFileSync('path/to/shpfile_base_name');
// or
Shp.readFile('path', function(error, data){
   	console.log(JSON.stringify(data));
})

TODO

  • Allow to be run from commandline as executable
  • Tests actually compare equality of results
  • Tests for shapefiles with multiple features
  • Separate out loading of file to allow preloading
  • Proper support for multiPolygons, etc

###Sample Data http://thematicmapping.org/downloads/world_borders.php CC-BY-SA 3.0

About

Node.js shapefile parser

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%