mapbox / shapefile-fairy

I put a zipfile under my pillow and the fairy brought me shapefiles
ISC License
16 stars 6 forks source link

Nested shapefiles not detected #7

Open GretaCB opened 9 years ago

GretaCB commented 9 years ago

Per https://github.com/mapbox/www.mapbox.com/issues/5183#issuecomment-70300683 , shapefiles within directories are not detected. Had this same issue with shapefiles back in the summer.

Relevant diff: https://github.com/mapbox/DEAD-unpacker-shapefile/commit/18d1977d691f741b585d200388e93ac37503c99b

cc @rclark

rclark commented 9 years ago

Thanks @GretaCB -- Could you provide an example zipfile that causes this problem?

GretaCB commented 9 years ago

@rclark https://dl.dropboxusercontent.com/u/43116811/Red_vial-INEGI.tar.gz,

rclark commented 9 years ago

Can you double-check this @GretaCB? I believe that this lib does extract nested shapefiles, but from .zip archives -- it doesn't play with .tar.gz files.

GretaCB commented 9 years ago

Ah, good point @rclark. Will double check.

GretaCB commented 9 years ago

edited

rclark commented 9 years ago

You mentioned getting an error if you extract the data from the tarball, then zip, then run it through shapefile-fairy. Can you provide a link to the zip file that failed?

GretaCB commented 9 years ago

@rclark I just took the tar.gz file, Gunzipped it, then compressed (zipped) the resulting directory.

rclark commented 9 years ago

Looks to me like the problem is that the file doesn't contain an .shx file. .shp, .shx, and .dbf are required for a shapefile.

GretaCB commented 9 years ago

Good eye.