You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "jiayuasu (via GitHub)" <gi...@apache.org> on 2026/10/23 06:32:07 UTC
[PR] fix(python/sedonadb-geopandas): give a flat envelope as a polygon, as GeoPandas does [sedona-db]
jiayuasu opened a new pull request, #1489:
URL: https://github.com/apache/sedona-db/pull/1489
## What changes
`GeoSeries.envelope` in `sedonadb-geopandas` gave a `LineString` for a geometry whose bounding box has no width or no height (a horizontal or vertical line, collinear points, a collapsed polygon): the engine's `ST_Envelope` does that, as PostGIS does. GeoPandas documents the envelope as "the point or smallest rectangular polygon", and GEOS gives a polygon with no area from the box's corners there, and a point only when the box has neither width nor height (as the engine does too).
Such a box is now rebuilt as a polygon with `ST_MakeEnvelope`, reversed into GEOS' corner order, so it matches GeoPandas corner for corner (`LINESTRING (0 0, 2 0)` gives `POLYGON ((0 0, 2 0, 2 0, 0 0, 0 0))`). The result keeps the envelope's spatial kind and CRS: for a geography column, still a planar longitude/latitude box.
## Testing
`tests/test_geoseries.py` compares the envelope's WKT with GeoPandas' for horizontal and vertical lines, a 3D line, collinear points, a collection of points, a collapsed polygon, a repeated point, a point, an empty line, and a missing geometry, and checks a geography meridian segment; both tests fail on `main`.
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(python/sedonadb-geopandas): give a flat envelope as a polygon, as GeoPandas does [sedona-db]
Posted by "jiayuasu (via GitHub)" <gi...@apache.org>.
jiayuasu merged PR #1489:
URL: https://github.com/apache/sedona-db/pull/1489
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(python/sedonadb-geopandas): give a flat envelope as a polygon, as GeoPandas does [sedona-db]
Posted by "jiayuasu (via GitHub)" <gi...@apache.org>.
jiayuasu commented on PR #1489:
URL: https://github.com/apache/sedona-db/pull/1489#issuecomment-6372308820
Since this PR is relatively simple, I plan to merge it within a day if there are no objections.
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org