-
Notifications
You must be signed in to change notification settings - Fork 11
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
PB-1221 : partially out of bound KML was ignored entirely #1139
Conversation
web-mapviewer Run #3905
Run Properties:
|
Project |
web-mapviewer
|
Branch Review |
bug-PB-1221-kml-extent-false-positive
|
Run status |
Passed #3905
|
Run duration | 04m 18s |
Commit |
42ea977175: PB-1221 : partially out of bound KML was ignored entirely
|
Committer | Pascal Barth |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
21
|
Skipped |
0
|
Passing |
212
|
View all changes introduced in this branch ↗︎ |
a37210a
to
0715a47
Compare
src/utils/extentUtils.js
Outdated
@@ -84,26 +84,33 @@ export function getExtentIntersectionWithCurrentProjection( | |||
) { | |||
return null | |||
} | |||
let extentInCurrentProjection = flattenExtent(extent) | |||
let currentProjectionAsExtentProjection = currentProjection.bounds.flatten | |||
let finalExtent = flattenExtent(extent) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why declare finalExtent here and not just declare it later with
let finalExtent = getExtentIntersection(flattenExtent(extent), currentProjectionAsExtentProjection)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
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