yeesian / ArchGDAL.jl

A high level API for GDAL - Geospatial Data Abstraction Library
https://yeesian.github.io/ArchGDAL.jl/stable/
Other
142 stars 26 forks source link

Add option to modify an `AbstractFeatureLayer` from an object implementing the Tables.jl interface #247

Open mathieu17g opened 3 years ago

mathieu17g commented 3 years ago

Investigate the possibility and interest (cf. https://github.com/yeesian/ArchGDAL.jl/pull/238#issuecomment-930769271) to modify an AbstractFeatureLayer from an object implementing the Tables.jl interface via not copying fields and geoms of an AbstractFeatureLayer when converting it to a table.

Here are some thoughts for discussion. It may suppose to:

yeesian commented 3 years ago

(Just tossing out some thoughts not necessarily helpful to implement what was described in https://github.com/yeesian/ArchGDAL.jl/issues/247#issue-1013215922, but to understand whether it should be pursued and how it might be implemented.)

At its heart, it sounds like it's proposing a new type corresponding to a FeatureLayer. To scope out the design, it might be helpful to clarify when users will prefer to use it over the alternatives:

  1. using the ArchGDAL.FeatureLayer
  2. materializing to a DataFrame/Table in Julia (e.g. GeoDataFrames, GeoTables)

It sounds like the feature/vector counterpart of DiskArrays / GeoData in the raster setting of

  1. using ArchGDAL.Dataset and ArchGDAL.RasterBand,
  2. materializing to an array/image in Julia,
  3. using DiskArrays.

My guess is that such an offering will be compelling if it's able to provide the ergonomics of using DataFames without making copies of the data: