# shp

> Convert shapefiles into geoJson without ogr2ogr/GDAL

Latest version **0.0.1** (published 2012-10-23) · 0 weekly downloads

## Install

```sh
npm install shp
pnpm add shp
yarn add shp
bun add shp
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2012-10-23 |
| First published | 2012-10-23 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.6.x |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Alex Yule |
| Maintainers | yuletide |
| Keywords | shp, esri, shapefile, geo, geojson, mapping |

## Links

- npm: https://www.npmjs.com/package/shp
- Repository: https://github.com/yuletide/node-shp
- npm.io page: https://npm.io/package/shp

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.0.1 (latest) — 2012-10-23

## README

node-shp
========

Node.js shapefile parser in pure JS

Thanks to:
[vanrijkom](http://code.google.com/p/vanrijkom-flashlibs/)
via [RandomEtc](https://github.com/RandomEtc/shapefile-js)


##What about shp2json?

Unlike substack's [shp2json](https://github.com/substack/shp2json), this library does not require [gdal](http://www.gdal.org/). Or anything other than `fs`.



Usage
===================
still in testing stages

   	var Shp = require('index');
   	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

---
_Source: https://npm.io/package/shp · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
