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

   ## Did you read the Contributor Guide?
   
   - Yes, I have read the [Contributor 
Rules](https://sedona.apache.org/latest-snapshot/community/rule/) and 
[Contributor Development 
Guide](https://sedona.apache.org/latest-snapshot/community/develop/)
   
   ## Is this PR related to a JIRA ticket?
   
   - Yes, the URL of the associated JIRA ticket is 
https://issues.apache.org/jira/browse/SEDONA-626. The PR name follows the 
format `[SEDONA-XXX] my subject`.
   
   ## What changes were proposed in this PR?
   
   This PR makes geometries returned by ST functions having correct SRIDs.
   
   * For geometry manipulation functions, the SRID of the output geometry 
should be the same as the input geometry.
   * For `ST_Transform`, the SRID of the output geometry is determined by the 
target CRS.
   
   Aggregation functions are not changed, making them behave correctly requires 
collecting the SRIDs of input geometries, which requires significant changes to 
the aggregation functions. We'll address that in future patches.
   
   The way we guarantee that the ST functions produce geometries with correct 
SRIDs is to construct the output geometry using the GeometryFactory of the 
input geometry and make sure that the GeometryFactory objects of geometries 
have the correct SRID property. We've modified the geometry constructors and 
serializers to achieve this. Most of the geometry transformation methods 
provided by JTS use the factory of input geometries to construct outputs, so 
this is the most error-proof way to preserve SRIDs in transformations, rather 
than calling setSRID 
   
   ## How was this patch tested?
   
   Passing existing tests and several newly added tests.
   
   ## Did this PR include necessary documentation updates?
   
   - No, this PR affects the behavior of some public APIs but I'd like to treat 
them as bugfixes.
   


-- 
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: dev-unsubscr...@sedona.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to