shapefile-js

Convert a Shapefile to GeoJSON. Not many caveats.

MIT License

Downloads
120.8K
Stars
737
Committers
21
shapefile-js - v6.0.1 Latest Release

Published by calvinmetcalf 3 months ago

Major redesign

  1. rewrites all logic to use DataView objects (available in node and the browser) instead of node buffers.
  2. Avoid all node specific APIs in the library and its dependencies, this includes changing to use but-unzip for unzipping stuff.
  3. no more poly filling for older browsers, this means we've gone from 234K MINIFIED to 226K UNMINIFIED (97k minified).
  4. Adds new API to pass an object containing shp and optional dbf, prj and cpg properties, allowing you to easily shapefile where the pieces were given to you individually, (it's the same, function, just accepts an object now).
  5. updates to the readme.
shapefile-js - v5.0.2

Published by calvinmetcalf 4 months ago

handles relative urls in projects now

shapefile-js - V5.0.1 Now handles shapefiles that lie to you

Published by calvinmetcalf 6 months ago

should also work better with rollup

shapefile-js - V5.0.0 Now with ESM modules

Published by calvinmetcalf 7 months ago

During a minor change to fix how inner rings were calculated I decided to modernize the code, we've upgraded to ESM modules and switched our build system to rollup. Additionally I removed lru cache as I don't think it was actually doing much and was causing some problems

shapefile-js - be less trusting of file lengths

Published by calvinmetcalf over 3 years ago

sensibly handle certain malformed files

shapefile-js - V4.0.1 very minor breaking changes

Published by calvinmetcalf over 3 years ago

breaking changes

  • shp.parseZip is now returns a promise instead of being synchronous, this is due to jszip being async in version 3
  • we use modern JS features like async functions, async/await, the WHATWG URL API, if your using this in a old browser it might stop worker

other stuff

  • it will correctly work with urls that have query params on them
  • it handles some edge cases like multiple null geometries in a row better