prantogg commented on PR #469: URL: https://github.com/apache/sedona-db/pull/469#issuecomment-3700323237
Thanks for the feedback! I've moved the code to `rust/sedona-geo` and am now using `GeoTypesExecutor` as suggested. I've also removed the output type parameter for now - we can address that in a later PR. However, I'm running into some [CI python test failures](https://github.com/apache/sedona-db/actions/runs/20584413572/job/59118209352?pr=469#step:14:3679) when comparing GeoJSON output between SedonaDB and PostGIS. The differences arise from both the geojson crate's serialization and how it converts from `geo_types::Geometry`. Specifically: - Coordinate formatting (integers vs floats): The `geojson` crate always serializes coordinates as floats, even for whole numbers. PostGIS optimizes by omitting .0 for whole numbers. - Empty polygon representation: The geojson crate's conversion from `geo_types::Polygon` to `geojson::Geometry` represents `POLYGON EMPTY` as `{"type":"Polygon","coordinates":[[]]}` (one empty ring), while PostGIS returns `{"type":"Polygon","coordinates":[]}` (no rings). What's your preference for handling these format differences? Should we: - Normalize these in the tests (converting PostGIS output to match SedonaDB's format)? - Look into customizing the GeoJSON serialization to match PostGIS exactly? -- 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]
