qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.33k stars 2.97k forks source link

Editing GeoArrow and GeoParquet geometries #51165

Closed Huite closed 1 year ago

Huite commented 1 year ago

Feature description

I'm very happy to see that with the (experimental) inclusion of GeoArrow and GeoParquet support in GDAL 3.5, QGIS can read and visualize these files.

According to the GDAL driver page, the drivers supports creation: https://gdal.org/drivers/vector/arrow.html https://gdal.org/drivers/vector/parquet.html#vector-parquet

It looks like the QGIS OGR provider simply isn't aware of this yet. E.g. I cannot choose these formats when right-clicking a vector Layer, and choosing "Export > Save Features as ...", in QGIS 3.28.1. From a quick scan of the source code, it seems like drivers are provided to the driver metadata, and I don't see these formats listed.

I would guess no one has gotten down to creating the entries for GeoArrow/GeoParquet. Or it is much more complicated / is there a principled reason not to allow creation & editing?

visr commented 1 year ago

I see in QGIS nightly that writing now works with #51392, that is great! But editing is still disabled. Given the issue title, perhaps we should re-open this issue?

rouault commented 1 year ago

Parquet is a read-only or write-only format. It can't be edited in place

visr commented 1 year ago

Am I right that Apache Arrow does support in-place edits, but support for this would first need to be added to GDAL?

For Parquet, I gather from #39574 that to GDAL needs to expose it as editable, which is sometimes done by simply rewriting the file, like was done for FlatGeobuf in https://github.com/OSGeo/gdal/pull/3110.

rouault commented 1 year ago

Am I right that Apache Arrow does support in-place edits

to my knowledge, no, the underlying Arrow and Parquet formats & library don't allow this, especially because of compression.

For Parquet, I gather from https://github.com/qgis/QGIS/issues/39574 that to GDAL needs to expose it as editable

that would be a possibility. That said, I'm moderately enthusiastic about complicating drivers of each intrinsically non-editable format to expose it as editable

visr commented 1 year ago

I'm moderately enthusiastic about complicating drivers of each intrinsically non-editable format to expose it as editable

I understand, I assumed as long as a format was writable but not editable that QGIS would take care of rewriting it.