Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the example test_linestring.js creates shapefile with null geometry #47

Open
haoliangyu opened this issue Mar 8, 2017 · 4 comments
Open

Comments

@haoliangyu
Copy link
Contributor

I run the example/test_linestring.js in the latest (v3.2.0) repo and it works with no error. But the generated shapefile is not rendered correctly at QGIS because the geometry is NULL, though the properties are properly saved.

screenshot from 2017-03-07 23-00-21

I run the script with Node v7.2.1 and open the shapefile with QGIS 2.16.1 in Ubuntu 16.04.

@iacovlev-pavel
Copy link

I have the same problem.

If you run a validity check on a shapefile created with shp-write the error is: unknown geometry type 0

POINT geometry type works fine, POLYLINE and POLYGON are not rendered in QGIS.

@ximex
Copy link

ximex commented Jul 21, 2017

maybe this fix it: #44 (comment)

@iacovlev-pavel
Copy link

Thank you very much, indeed that fixed the problem.

since the fix in #44 is related to parsing from JSON, to apply this fix when using the write function change in https://github.com/mapbox/shp-write/blob/master/example/test_linestring.js#L17
points, to [points],

@sheindel
Copy link
Contributor

Good news: v0.4.2 is now available. Since #44 hopefully resolves this issue I'm hoping this latest change helps as well.

Less good news: Mapbox changed their deployment organization so this package is now hosted under a different package

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants