PB-1221 : partially out of bound KML was ignored entirely#1139
Merged
Conversation
web-mapviewer
|
||||||||||||||||||||||||||||
| Project |
web-mapviewer
|
| Branch Review |
bug-PB-1221-kml-extent-false-positive
|
| Run status |
|
| Run duration | 04m 18s |
| Commit |
|
| Committer | Pascal Barth |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
21
|
|
|
0
|
|
|
212
|
| View all changes introduced in this branch ↗︎ | |
a37210a to
0715a47
Compare
sommerfe
reviewed
Nov 26, 2024
src/utils/extentUtils.js
Outdated
| } | ||
| let extentInCurrentProjection = flattenExtent(extent) | ||
| let currentProjectionAsExtentProjection = currentProjection.bounds.flatten | ||
| let finalExtent = flattenExtent(extent) |
Contributor
There was a problem hiding this comment.
why declare finalExtent here and not just declare it later with
let finalExtent = getExtentIntersection(flattenExtent(extent), currentProjectionAsExtentProjection)
Contributor
Author
There was a problem hiding this comment.
good point, now that it's not used in the next if block I could move the declaration further down
The KML extent detection was not performing as expected with KML that had only one dimension out of LV95 bounds. To counteract that, I've reverted the logic in the extent calculation, transforming LV95 bounds into WGS84 to do the matching instead of transforming a potentially big WGS84 extent to LV95 (lead to big math error...)
0715a47 to
42ea977
Compare
sommerfe
approved these changes
Nov 26, 2024
This file contains hidden or 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
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.
The KML extent detection was not performing as expected with KML that had only one dimension out of LV95 bounds.
To counteract that, I've reverted the logic in the extent calculation, transforming LV95 bounds into WGS84 to do the matching instead of transforming a potentially big WGS84 extent to LV95 (lead to big math error...)
Test link with sample file
Test link