petern48 opened a new pull request, #2471:
URL: https://github.com/apache/sedona/pull/2471

   ## Did you read the Contributor Guide?
   
   - Yes, I have read the [Contributor 
Rules](https://sedona.apache.org/latest/community/rule/) and [Contributor 
Development Guide](https://sedona.apache.org/latest/community/develop/)
   
   ## Is this PR related to a ticket?
   
   - Yes, and the PR name follows the format `[GH-XXX] my subject`. Closes #2470
   
   ## What changes were proposed in this PR?
   Previously, ST_Envelope would always return POINT EMPTY for any empty input 
because that's the behavior of JTS's `.getEnvelope()` method (for some reason). 
This PR handles empty geoms explicitly to follow the PostGIS behavior, which is 
to return the input geometry. Note this means that an input of 
`GEOMETRYCOLLECTION (GEOMETRYCOLLECTION EMPTY, LINESTRING EMPTY)` will result 
in the same geom as input, and not `GEOMETRYCOLLECTION EMPTY`.
   
   ## How was this patch tested?
   Added tests
   
   ## Did this PR include necessary documentation updates?
   
   - No, I didn't find the need to, since this is a specific edge case, and 
[PostGIS's docs](https://postgis.net/docs/ST_Envelope.html) doesn't explicitly 
document it either.


-- 
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