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

Error converting to shz (EISDIR) #116

Open
vitorcricas opened this issue Feb 15, 2024 · 0 comments
Open

Error converting to shz (EISDIR) #116

vitorcricas opened this issue Feb 15, 2024 · 0 comments

Comments

@vitorcricas
Copy link

Hi,

working with ogre4.0.0 and ogr2ogr 5.0.0

When converting from geojson to shapefile I get one directory created on /tmp like /tmp/ogr_1708007318167.shz with the shx, shp, prj and dbf files in it. Shouldn't this be a compressed file instead of a directory?

I got this error on output, certainly because the returned stream was supposed to be a file and not a directory

ogre > [Error: EISDIR: illegal operation on a directory, read] { errno: -21,code: 'EISDIR', syscall: 'read' ogre > } ogre > Ogre (4.0.0) ready. Port 3000

As a workaround I changed ogr2ogr index.js source

from this
... case "esri shapefile": path += ".shz"; ext = ".shz"; ...
to this
... case "esri shapefile": path += ""; ext = ".zip"; ...

so that a zip file is returned

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

1 participant