mapbox / shp-write

create and write to shapefiles in pure javascript
BSD 3-Clause "New" or "Revised" License
290 stars 186 forks source link

Support donut (hole) polygon #30

Closed jvail closed 10 months ago

jvail commented 8 years ago

I needed Polys with holes and therefore put some code together ... quite annoying to deal with all those arrays of arrays of ...

I tested it with a few odd combinations of (Multi-)polys with and without holes. You might want to take a look at it - and finally pull it if you think it makes sense ... https://github.com/jvail/shp-write

Jan

P.S.: ... thank you for this project (with or without holes)

chriswhong commented 7 years ago

+1 for this, I was attempting to use this library to download isochrones created by OpenTripPlanner. OTP outputs a FeatureCollection, each feature being a MultiPolygon that can have lots of holes. travelsheds

It downloads a zip with an empty folder and not much feedback about what went wrong. I also tried using the fork that @jvail wrote, but the same thing (empty zipped folder) happened.

jvail commented 7 years ago

Could you post a link to the data set (or a part of it)?

tmcw commented 7 years ago

Merged with #36

landonreed commented 7 years ago

There appears to still be MultiPolygon features that shp-write cannot write. For example: downloading http://bl.ocks.org/d/00101a5db22d0f4e914993bc0a2e2a1f results in the same empty folder described above.

sheindel commented 10 months ago

Hello! We should now be able to write multipolygons, so I'm hoping this is resolved. Can you try with the latest version and close this issue if it is resolved? Thanks!

Mapbox changed their deployment organization so this library is now hosted under a different package name

@mapbox/shp-write https://unpkg.com/@mapbox/shp-write@latest/shpwrite.js

jvail commented 10 months ago

Sorry, I'd like to but after all those years I am unable to recover my original problem. Thanks for fixing :)