-
Notifications
You must be signed in to change notification settings - Fork 0
56-display-lat-lon-and-elevation-in-2d-profile-measurement #57
56-display-lat-lon-and-elevation-in-2d-profile-measurement #57
Conversation
… x,y,z Because of the change of coordinate system the z coordinate no longer represents the elevation of a point. Instead of displaying x,y,z it now displays lat, lon, and elevation which is more useful to the user. Also removed some of the attributes which are 0 and cluttering the space
WalkthroughA new 2D profile override module is added to customize Potree's profile visualization. It includes CSS styling to fix clipping and improve label readability, a JavaScript module that patches profile behavior to derive elevation from ECEF coordinates and modify the selection panel display, and integrates this into the main viewer initialization. Changes
Sequence DiagramsequenceDiagram
participant Viewer as Potree Viewer
participant Init as init2DProfileOverride
participant Potree as ProfileWindow
participant DOM as DOM / MutationObserver
Viewer->>Init: init2DProfileOverride(viewer)
activate Init
Init->>Init: Attempt to patch ProfileWindow.addPoints
alt Patch Available
Init->>Potree: Override addPoints with ECEF extraction
else Patch Not Available
Init->>Init: Poll with retry (up to timeout)
Init->>Potree: Override addPoints when available
end
Init->>DOM: Setup MutationObserver for selection panel
deactivate Init
Viewer->>Potree: User selects point in profile
Potree->>DOM: Render selection info panel
DOM->>Init: Observer detects new panel
Init->>DOM: Modify rows to display lon/lat/elevation<br/>Remove extraneous fields
DOM-->>Viewer: Updated panel displayed
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Areas requiring extra attention:
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Free 📒 Files selected for processing (4)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
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.
The functionality works as described. Did not encounter the bug described. Tried making several height profiles to check if this would agitate the bug, it did not.
As for the code itself, it looks good to me. Though, i am not experienced in the potree logic, so i might have overlooked noticeable improvements, inefficiencies or faults. The js logic looks good.
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 :D
Did not see any bug, lat, long, elev responsive, code looks clean, comments are nice!
Issue number
Closes #56
Description
Because of the change of coordinate system the z coordinate no longer represents the elevation of a point. Instead of displaying x,y,z it now displays lat, lon, and elevation which is more useful to the user. Also removed some of the attributes which are 0 and cluttering the space
Testing steps
Create a profile measurement, and open the 2D profile. Check if the y-axis displays correct depth values. Also hover points to see if the info box shows lat, lan, and elevation, and check if the values look correct.
Try to hover a lot of points going back and forth across the 2D profile, and see if the info window stays persistent. I have seen a bug before where it sometimes reverts to the x, y, z view, but I think that is fixed. If this happens, try restarting the dev environment.