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

Remove constructor options from TransformXY methods #527

Merged
merged 2 commits into from
Sep 26, 2023

Conversation

peterstace
Copy link
Owner

Description

The TransformXY methods transforms the coordinates of geometries in arbitrary ways via a user-supplied mapping. It should be obvious that this potentially could cause invalid results. For example, the mapping could trivially map every coordinate pair of a polygon to the same point. In practice, transformations are either affine (translation, rotation, scaling), or, at the very least, topologically preserving (e.g. WGS84 to a Mercator or Conic projection).

This change removes the choice to validate or not in TransformXY methods, always omitting a validation step. Users can still validate manually via the Validate method if they wish to.

Check List

Have you:

  • Added unit tests? No, however existing tests have been updated.

  • Add cmprefimpl tests? (if appropriate?) N/A.

  • Updated release notes? (if appropriate?) No, release notes will be updated when all ctor option related changes have been made.

Related Issue

The `TransformXY` methods transforms the coordinates of geometries in
arbitrary ways via a user-supplied mapping. It should be obvious that
this potentially could cause invalid results. For example, the mapping
could trivially map every coordinate pair of a polygon to the same
point. In practice, transformations are either affine (translation,
rotation, scaling), or, at the very least, topologically preserving
(e.g. WGS84 to a Mercator or Conic projection).

This change removes the choice to validate or not in `TransformXY`
methods, always omitting a validation step. Users can still validate
manually via the `Validate` method if they wish to.
@peterstace peterstace self-assigned this Sep 15, 2023
geom/type_envelope.go Outdated Show resolved Hide resolved
@peterstace
Copy link
Owner Author

Thanks for reviewing @albertteoh , I really appreciate it 😁

Base automatically changed from no_validation_in_geos_wrapper to master September 26, 2023 19:03
@peterstace peterstace merged commit 8495afc into master Sep 26, 2023
1 check passed
@peterstace peterstace deleted the remove_validation_from_transform_xy branch September 26, 2023 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants