Integrate KyFromAbove oblique imagery#11910
Integrate KyFromAbove oblique imagery#11910Sikandar1310291 wants to merge 4 commits intoopenstreetmap:developfrom
Conversation
| padding: 5px; | ||
| background-color: var(--bg-color); | ||
| } | ||
| .ideditor[dir='ltr'] .photoviewer { |
There was a problem hiding this comment.
can you drop code-style changes from this PR?
why these got mixed in?
If these are actually needed, please make them separately
1ec5
left a comment
There was a problem hiding this comment.
Thank you for an implementation for this feature. The maintainers may need to consider our openness to maintaining this amount of custom code for a regional imagery provider (albeit a very nice one), versus a more general framework for supporting this and similar services.
For our awareness, was this PR authored with the assistance of an LLM? Also, the commits to this branch are authored by @awais62 – is that an alternative account of yours?
modules/ui/ky_oblique_viewer.js
Outdated
| // readRGB returns RGB, we need RGBA for imageData | ||
| // geotiff.js readRGB often returns a Uint8Array with 3 values per pixel | ||
| // But canvas needs 4. Let's adjust. | ||
| // Wait, geotiff.js readRGB might return typed array. |
There was a problem hiding this comment.
These comments are a little confusing. Maybe a condensed version would be a little clearer.
There was a problem hiding this comment.
"Let's adjust." looks like LLM output, especially when mixed with pointless code-style changes
modules/ui/ky_oblique_viewer.js
Outdated
| ctx.putImageData(imageData, 0, 0); | ||
|
|
||
| const attribution = d3_select('.ky-oblique-wrapper .photo-attribution'); | ||
| attribution.text(`KyFromAbove - Shot ID: ${_image.key} - Angle: ${_angle}`); |
There was a problem hiding this comment.
Not sure we need the raw shot ID as attribution text. The attribution should probably just be “KyFromAbove”, matching their aerial imagery layers.
In principle, we could have a button that, when clicked, tags a feature with the shot ID. Compare with the Mapillary and Panoramax viewers. We’d need to settle on a standard key, which would require a discussion on the forum, if not a full-blown feature proposal.
modules/services/kyfromabove.js
Outdated
|
|
||
| try { | ||
| const data = await d3_json(url, { signal: controller.signal }); | ||
| _kyCache.loaded[tile.id] = true; |
There was a problem hiding this comment.
This fails to lint:
43:5 error Possible race condition:
_kyCache.loaded[tile.id]might be assigned based on an outdated state of_kyCacherequire-atomic-updates
There was a problem hiding this comment.
You fixed the linter error by silencing the error, but is it actually a false positive?
|
@matkoniecz @1ec5 Thank you for the feedback. I've updated the PR to:
Everything is now passing build and lint locally. Appreciate your review! |
|
You haven’t addressed the questions about LLM usage or that other user who’s making the commits… |
…for kyfromabove - modules/services/kyfromabove.js: Fix require-atomic-updates by capturing a local const cache = _kyCache snapshot before the await, so all post-await writes go to the correct cache object. Removes the eslint-disable comment that was silencing a real race condition. - modules/ui/ky_oblique_viewer.js: Fix linebreak-style error (CRLF -> LF), align indentation to 2-space (repo standard), convert updateImage() from async/await to a promise chain to resolve require-atomic-updates on _loading, make setAngle() synchronous (fixes require-await), and remove the redundant first RGB copy loop. - package-lock.json: Regenerate to resolve merge conflict with develop branch.
|
I've pushed another update to address the remaining feedback and CI failures.
Everything should now pass the CI checks cleanly. Let me know if there's anything else! |
There was a problem hiding this comment.
You haven’t responded to #11910 (review) and #11910 (comment). We need your cooperation in understanding the provenance of this large amount of code in order to effectively review it.
Please fix the merge conflict so that CI will run. Thank you.
Before asking for more feedback please address one that you have received. You haven’t addressed the questions about LLM usage or that other user who’s making the commits. |
|
@matkoniecz @1ec5 To answer your questions:
I have also resolved the merge conflict in package-lock.json and pushed the latest changes. Let me know if there's anything else needed! |
This PR integrates the KyFromAbove oblique aerial imagery service from Kentucky's Open Data Portal into the iD editor.
Key features:
Updates (Addressing Feedback):
Fixes #11853