Kontinuation commented on PR #460:
URL: https://github.com/apache/sedona-db/pull/460#issuecomment-3664051860

   There is a way to make SedonaDB work directly with custom serialization 
formats without converting to WKB first. Below is a high-level non-exhaustive 
roadmap of the required changes.
   
   1. We implement geo-traits and geo-traits-ext for the serialization format, 
this is similar to how [Wkb implements 
geo-traits](https://github.com/georust/wkb/blob/2014885b77d2b58d127cfd94f47ac3cc41506f5f/src/reader/linestring.rs#L113-L149)
 and 
[geo-traits-ext](https://github.com/apache/sedona-db/blob/3487c358981c2715680b21c99a3e69c406aa9cbf/rust/sedona-geo-traits-ext/src/wkb_ext.rs).
 This allows generic geo algorithms to work directly with them without 
deserializing the buffer into intermediate formats.
   2. Extend 
[SedonaType](https://github.com/apache/sedona-db/blob/3487c358981c2715680b21c99a3e69c406aa9cbf/rust/sedona-schema/src/datatypes.rs#L29-L35)
 to natively support that custom format.
   3. Support something like `Into<geos::Geometry>` and `From<geos::Geometry>` 
for directly decoding to/encoding from geometry objects defined by third party 
libraries. This makes [ST functions based on 
GEOS](https://github.com/apache/sedona-db/tree/3487c358981c2715680b21c99a3e69c406aa9cbf/c/sedona-geos/src)
 having less performance overhead.
   4. There are some existing code assuming that the data format is WKB and 
directly work with them. We should refactor some of them to be generic code 
working with geo-traits values.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to