apache / parquet-java

Apache Parquet Java
https://parquet.apache.org/
Apache License 2.0
2.48k stars 1.37k forks source link

PARQUET-2471: Add support for geometry logical type #1379

Open wgtmac opened 1 week ago

wgtmac commented 1 week ago

This is the PoC of https://github.com/apache/parquet-format/pull/240

Jira

Tests

Commits

Style

Documentation

wgtmac commented 1 week ago

Thanks @paleolimbot for the quick review! I've addressed your feedback and also added page index support for geometry stats. BTW, it is a convention that we need PoC on another Parquet implementation to move forward the proposal. I plan to add similar things to parquet-cpp. Do you happen to know any JTS-parity on the C++ side? Or do you have a plan to implement the PoC? I guess there should be a lot of existing code on the GeoParquet side.

jiayuasu commented 1 week ago

@wgtmac The JTS-parity on C++ side is GEOS, which is a C++ port of JTS: https://github.com/libgeos/geos

Note that: GEOS is LGPL 2.1, which is NOT compatible with ASF

jiayuasu commented 1 week ago

Core sedona contributors @Kontinuation and @zhangfengcdt , can you also review this?

@wgtmac Thanks for putting together this PR. I guess you might need some help from the Sedona community regarding the Java geometry implementation together with JTS. We can work together to implement this POC.

wgtmac commented 1 week ago

Thanks @jiayuasu for your valuable feedback! Yes, it would be great if we can get direct help from geospatial experts!

paleolimbot commented 1 week ago

Do you happen to know any JTS-parity on the C++ side?

As Jia mentioned, it's GEOS, but this is not something the C++ implementation can/should take on as a dependency.

I guess there should be a lot of existing code on the GeoParquet side.

GDAL has quite a lot to draw from ( https://github.com/OSGeo/gdal/tree/master/ogr/ogrsf_frmts/parquet ), although I think pretty much all we need to do is walk WKB for bounding boxes and geometry type ( https://github.com/OSGeo/gdal/blob/12dab86ca2d8b1a65c4c085e137c62294682ac1d/ogr/ogr_wkb.cpp#L387-L584 ).

Or do you have a plan to implement the PoC?

I am happy to give it a shot (I'll make a start this week).