ogre icon indicating copy to clipboard operation
ogre copied to clipboard

Error converting to shz (EISDIR)

Open vitorcricas opened this issue 1 year ago • 0 comments

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

vitorcricas avatar Feb 15 '24 14:02 vitorcricas