ArchGDAL.jl
ArchGDAL.jl copied to clipboard
Construct ArchGDAL. IFeatureLayer via named tuples or DataFrame
I have a use case of filtering rows out of an ArchGDAL table and then return ArchGDAL.Table datatype. It would be helpful to construct an ArchGDAL.Table using an array of named tuples or even a DataFrame from DataFrames.jl.
https://github.com/yeesian/ArchGDAL.jl/blob/0bdcb008741fa1c9d09c119eca8a800aa6a2654e/src/tables.jl#L7-L9
cc: @juliohm @visr
@zerefwayne I suggest starting a draft PR in GADM.jl and linking to this issue. It is hard to know exactly what you are trying to achieve otherwise. :+1:
We currently support https://tables.juliadata.org/stable/#Implementing-the-Interface-(i.e.-becoming-a-Tables.jl-source)-1 in src/tables.jl.
It will be nice to support the creation of an ArchGDAL.Dataset (or FeatureLayer) from a corresponding table via https://tables.juliadata.org/stable/#Using-the-Interface-(i.e.-consuming-Tables.jl-compatible-sources)-1: here's an example of how it can be done. Here's a second example: https://discourse.julialang.org/t/how-to-create-a-new-shapefile-containing-a-few-points.
Shameless plug (I'm the author), I've made a first implementation over at https://github.com/evetion/GeoDataFrames.jl.
@yeesian (cc: @evetion) I'm could work on this by creating IFeatureLayer constructor for table types (creating an associated a "Memory" driver Dataset).
Writing to a file, could then be handled by a write, leaving GDAL handling the driver restrictions as pointed in https://github.com/yeesian/ArchGDAL.jl/issues/147#issuecomment-714186909
That'll be really awesome @mathieu17g! I also agree that the analogous GDAL object is a feature layer and have updated the title to reflect it.
Somewhat related: #153