Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SEDONA-626] Make ST functions return geometries with correct SRIDs #28

Closed
wants to merge 18 commits into from

Conversation

Kontinuation
Copy link

@Kontinuation Kontinuation commented Jul 11, 2024

Main PR: apache#1521

Did you read the Contributor Guide?

Is this PR related to a JIRA ticket?

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 more error-proof than calling Geometry.setSRID everywhere.

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.

jbampton and others added 17 commits June 30, 2024 20:31
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.18.1 to 2.19.1.
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](pypa/cibuildwheel@v2.18.1...v2.19.1)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…pache#1506)

* AWS Glue Tutorial: replace s3 instructions with maven links

* capitalize python

* use current_geotools

---------

Co-authored-by: jameswillis <james@wherobots.com>
* feat: throw an error when column is not numeric and add stroked parameter

* fix: tests
…ly to avoid exception in query plan canonicalization (apache#1518)
@jiayuasu jiayuasu closed this Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants