-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Issue
The GeoPackage file format was developed by OGC a while ago to store "vector" and "raster" data as SQLite containers. It is widely adopted in open datasets like GADM and GeoBR.
GeoIO.jl currently relies on the external GDAL library to load/save .gpkg
files:
load
Lines 66 to 69 in e2f1bc5
else # fallback to GDAL | |
data = AG.read(fname; kwargs...) | |
return AG.getlayer(data, layer - 1) | |
end |
save
Lines 53 to 55 in e2f1bc5
else # fallback to GDAL | |
agwrite(fname, geotable; kwargs...) | |
end |
Given the numerous reports of GDAL build failures (at least one per year for the last 5 years):
- GDAL broken on windows because libnetcdf-19.dll JuliaGeo/GDAL.jl#191
- GDAL_jll broke – uses LERC_jll without declaring it JuliaGeo/GDAL.jl#179
- GMT_jll build breaks on Windows because of a "could not load library C:... \libgdal-35.dll" JuliaGeo/GDAL.jl#174
- Is GDAL_jll broken on Windows? JuliaGeo/GDAL.jl#173
- GDAL build is broken JuliaGeo/GDAL.jl#158
- GDAL does not compile in Alpine:3.14 Linux docker container JuliaGeo/GDAL.jl#151
- Build GDAL for Apple M1 JuliaGeo/GDAL.jl#130
- Cannot precompile GDAL after an update of GEOS_jll from 3.9.0 to 3.10.0 JuliaGeo/GDAL.jl#126
- GDAL build is failing on MacOS with Julia 1.6.0-beta1 JuliaGeo/GDAL.jl#113
- win10 could not load library "libgdal-26.dll" The specified module could not be found JuliaGeo/GDAL.jl#101
we can't rely on it moving forward.
Bounty
We need a new extra/gpkg.jl
implementation that handles GeoPackage "vector" tables in native Julia.
The load implementation should consist of SQLite.jl queries that convert
- the table of attributes stored in the database into a Tables.jl
table
- the geometries (with CRS information) into a vector of geometries
geoms
from Meshes.jl
followed by a geotable = georef(table, geoms)
call to combine these two objects into a GeoTable
.
The save implementation should do the reverse operation, i.e. it should save
- the
values(geotable)
as a SQLite attribute table - the
domain(geotable)
as SQLite geometries
in the final GeoPackage file.
A solution that
- implements the corresponding OGC GeoPackage specification
- can load/save all
*.gpkg
files from GeoArtifacts.GADM - can load/save all
*.gpkg
files from GeoArtifacts.GeoBR - adheres to our code style and passes our current tests
will get a /bounty $500.
Tips
- The GeoPackage guidance document contains useful information, including an implementation guide
- If you need any assistance, please feel free to ask questions in our Zulip channel