-
Notifications
You must be signed in to change notification settings - Fork 4
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
Use geometry
rather than geom
#50
Comments
@rafaqz, the name |
Its probably defined in the dataset itself, but gdal passes us GADM.jl strips that information by converting the table with Without changing the column name to the generic one at the same time you lose ecosystem compatability. Another option would be to define a wrapper table that knows which column has the geometries. |
What is your suggestion then? We simply get whatever column name that GDAL returns to us and move it forward. I don't see what we could do differently? Why we need an extra wrapper table type if ArchGDAL.jl already provides that for us? |
But youre not returning the ArchGDAL table... thats where the problem comes from. If you did it would work, and would be ArchGDALs problem if it didnt. From my perspective, the options are
It would be nice not to do 4, its a bit confusing to new users to see that in code everywhere. |
A fifth options is to leverage the new metadata interface for tables, and add the column name to metadata so it propagates everywhere. But its some serious work to implement that in GeoInterface and in every table producing geo package, and someone would need to put their hand up to do it. Edit: And I dont think it propagates to the table youre returning anyway, so probably not an option. |
We should probably go with this option. If someone starts working on it, please comment on the issue. |
GeoInterface.jl defaults to tables using
geometry
as the geometry column name. It would be nice if GADM.jl tables just worked in e.g. Rasters.jl without manually specifying the geometry column or getting them out.See:
https://github.com/JuliaGeo/GeoInterface.jl/blob/main/src/interface.jl#L47
This default can be overridden with a custom table type in
GeoInterface.geometrycolumns
. But forNamedTuple
tablesthat requires type pyracy, so using the default column name is the way to get compatibility.
The text was updated successfully, but these errors were encountered: