Shapefile.jl
Shapefile.jl copied to clipboard
Implement a `.zip` writer
This would be as simple as amending the function here
https://github.com/JuliaGeo/Shapefile.jl/blob/69bad032c3caef938c5f020ba39107e53a7ac593/src/writer.jl#L93
to switch behaviour based on the file name and return ZipFile file descriptors instead. This would be similar to the behaviour we introduced in .zip reading.
See https://github.com/fhs/ZipFile.jl/blob/a599b0aac5d17403fdbbc4ea63612be299cf8417/src/ZipFile.jl#L14-L1 for some example code that can do this, it seems quite straightforward.
Only half joking, ideally we dumb down/nag about Shapefile writes, and default/advice to things like geopackage instead. And post about http://switchfromshapefile.org/
Probably we need a native geopackage writer first ;)
Fair point, let's add it to the board and put it higher prio than this zip writer :)
The reader in GeoPackage.jl semi works, it just needs to be cleaned up a lot + optimized :D. I'm not sure about the writer though, that seems like a lot of work...
So that you know, ZipFile.jl can be super slow when compressing large files: https://discourse.julialang.org/t/file-zipping-taking-longer-for-large-files/115963.
I made https://github.com/JuliaIO/ZipArchives.jl to save Zarr data in a .zip file, but it might also be useful here.