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

Compress shapefiles #51

Open
kdeloach opened this issue Jan 3, 2017 · 4 comments
Open

Compress shapefiles #51

kdeloach opened this issue Jan 3, 2017 · 4 comments
Labels

Comments

@kdeloach
Copy link

kdeloach commented Jan 3, 2017

Investigate enabling compression on NHD shapefiles to reduce filesize. This could potentially improve the responsiveness of RWD after a new worker has been provisioned.

Ref: #46 (comment)

@kdeloach kdeloach added the NSF label Jan 3, 2017
@mmcfarland
Copy link

mmcfarland commented Jan 3, 2017

I don't believe there is an OGR driver for compressing/reading compressed shapefiles, but we should do this for the rasters via gdal drivers.

@emiliom
Copy link

emiliom commented Jan 5, 2017

In case it helps ... OGR can read zipped (or tarballed) shape files using the "virtual file system" (vfs/vsi) drivers or approach. I couldn't find a good, focused documentation on this at the official gdal/ogr web site, other than this terse and unhelpful ogr "memory" driver page. But you can google for "vsi" or "vsizip" and find references easily. I found this old but good blog post, plus a somewhat old GDAL/OGR wiki page.

There are probably important performance issues that you should read up on before pursuing that route, though. I've used vsi stuff sporadically, and not enough to know much about performance issues.

@mmcfarland
Copy link

That's a good tip, @emiliom. I've use vsicurl with gdal, we'll check out vsizip to see if the compression on the shapefiles buys us much and at what cost.

@emiliom
Copy link

emiliom commented Jan 5, 2017

Glad it was helpful, @mmcfarland. I'd be interested in hearing (say, via this github issue) what you learn about cost tradeoffs, once you've tested it -- regardless of whether that's in the next 24 hours or 24 weeks ...

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

No branches or pull requests

3 participants