generated from linz/template-python-hello-world
-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: update existing Collection TDE-1359 #1224
Draft
paulfouquet
wants to merge
14
commits into
master
Choose a base branch
from
feat/update-collection
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+446
−47
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 25, 2025
### Motivation When an existing capture-area geometry is being modified (polygon being removed/added), as a result the polygons points can be moved around. When the overall geometry ends up being the same (no visual change), we prefer the capture-area geometry to not show a change (difference between existing and new/re-processed one). ### Modifications - Use [shapely.normalize()](https://shapely.readthedocs.io/en/2.0.3/reference/shapely.normalize.html) to keep the geometry consistent. What does `shapely.normalize()`? According to [the official documentation](https://shapely.readthedocs.io/en/latest/geometry.html#canonical-form): > - the coordinates of exterior rings follow a clockwise orientation and interior rings have a counter-clockwise orientation > - the starting point of rings is lower left > - elements in collections are ordered by geometry type: by descending dimension and multi-types first (MultiPolygon, Polygon, MultiLineString, LineString, MultiPoint, Point). Multiple elements from the same type are ordered from right to left and from top to bottom. Because, "_the coordinates of exterior rings follow a clockwise orientation and interior rings have a counter-clockwise orientation_" is going against [RFC 7946](https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6) - "_A linear ring MUST follow the right-hand rule with respect to the area it bounds, i.e., exterior rings are counterclockwise, and holes are clockwise._", we need to apply `orient()` after `normalize()` the geometry. ### Verification - Unit tests - Other tests to come in #1224
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
When a provider supplies an update for an already published dataset, we would like to update the Collection accordingly to the new files supplied.
Modifications
Verification