Skip to content

fix: well layer: enhance well name display to avoid cluttering#2433

Closed
nilscb wants to merge 1 commit intoequinor:masterfrom
nilscb:WellClutterContinued
Closed

fix: well layer: enhance well name display to avoid cluttering#2433
nilscb wants to merge 1 commit intoequinor:masterfrom
nilscb:WellClutterContinued

Conversation

@nilscb
Copy link
Collaborator

@nilscb nilscb commented Feb 3, 2025

@nilscb nilscb linked an issue Feb 3, 2025 that may be closed by this pull request
@nilscb nilscb self-assigned this Feb 3, 2025
@nilscb nilscb added bug Something isn't working AspenTech Task owned by AspenTech map-component Issues related to the map component. labels Feb 3, 2025
const percentages = [50, 25, 75, 12.5, 87.5, 25, 75];

const n = well_xyz?.length ?? 2;
if (well_xyz && n >= 2) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add some comments to explain the algorithm (are a ref to original if it comes from a known algo)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, I don't get the logic. If I understand correctly, if the algo fail with the provided percentage, a hard-coded list of percentages completely unrelated to the requested one is used.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please wait a bit with this code review. The Wellslayer.stories file is included by mistake

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is not related to story, but to wellsLayer.ts

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a regular sampling along the trajectory in search of a camera visible location. It is shuffled to minimize large jumps and to tend towards the middle.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What bothers me is that it does absolutely not take into account requested position.
I would use an approach to shift away from the requested position , not to ignore it

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What bothers me is that it does absolutely not take into account requested position.
I would use an approach to shift away from the requested position , not to ignore it

I agree, it could be better usability if the labels shifted more gradually from the requested position instead of popping up at a random position.

@nilscb nilscb force-pushed the WellClutterContinued branch from 6af52bb to 0537835 Compare February 3, 2025 15:10
@nilscb
Copy link
Collaborator Author

nilscb commented Feb 4, 2025

The auto positioning of lables is now default off and controlled by the well property "wellNameAutoPosition"

const percentages = [50, 25, 75, 12.5, 87.5, 25, 75];

const n = well_xyz?.length ?? 2;
if (well_xyz && n >= 2) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is not related to story, but to wellsLayer.ts

/** It true label position will be auto calculated if possible to be inside view volume at all times.
* default false.
*/
wellNameAutoPosition: boolean;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rename that to adjustWellNamePosition

const percentages = [50, 25, 75, 12.5, 87.5, 25, 75];

const n = well_xyz?.length ?? 2;
if (well_xyz && n >= 2) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What bothers me is that it does absolutely not take into account requested position.
I would use an approach to shift away from the requested position , not to ignore it

@hkfb
Copy link
Collaborator

hkfb commented Feb 6, 2025

If I disable hideOverlappingWellNames then all labels disappear, which is unexpected:
image

Copy link
Collaborator

@hkfb hkfb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also appears that if you provoke a 90 degree angle on the labels by rotating the camera, then the labels disappear.

@w1nklr w1nklr changed the title fix: well layer: wellNameAtTop control is inverted #2432 fix: well layer: enhance well name display to avoid cluttering Feb 13, 2025
@nilscb nilscb closed this Mar 14, 2025
@nilscb nilscb reopened this Mar 14, 2025
@nilscb nilscb marked this pull request as draft March 14, 2025 13:41
@nilscb nilscb force-pushed the WellClutterContinued branch 2 times, most recently from b0e9d0e to 41bbb82 Compare March 18, 2025 13:40
@nilscb nilscb force-pushed the WellClutterContinued branch from 41bbb82 to 886b71a Compare March 18, 2025 13:41
@hkfb hkfb linked an issue Mar 19, 2025 that may be closed by this pull request
hkfb added a commit that referenced this pull request Mar 27, 2025
Continuation of #2433

Fixes #767 and #947 

Summary of changes:
* @nilscb added functionality for positioning and backgrounds for well
labels
* Extracted a new deck.gl layer `WellLabelLayer` which is used to render
labels in the `WellsLayer`. Its props can be specified using the
`wellLabel` prop in `WellsLayer`
* In order to prevent z buffer fighting, z coordinates were modified by
@nilscb. I modified it slightly so that a single layer can display
consistently in both Orthographic and Orbit views. I also narrowed the
near and far plane scope for Orthographic views in order to further
reduce z buffer collision.
* Created some stories to demonstrate the styling and positioning
options for well labels
* Added procedurally generated synthetic wells in order to demonstrate
the above


![image](https://github.com/user-attachments/assets/00bef14d-c479-45ce-bd8e-36f39c1faf4c)

---------

Co-authored-by: Nils Christian Bonnevie <nils.christian.bonnevie@gmail.com>
hkfb pushed a commit that referenced this pull request Mar 27, 2025
@hkfb
Copy link
Collaborator

hkfb commented Mar 28, 2025

@nilscb ok to close this PR, since it was superceded by #2487?

@w1nklr
Copy link
Collaborator

w1nklr commented Mar 28, 2025

@nilscb ok to close this PR, since it was superceded by #2487?

Fine for me

@hkfb hkfb closed this Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AspenTech Task owned by AspenTech bug Something isn't working map-component Issues related to the map component.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

well layer: wellNameAtTop control is inverted [NGRM] - Remove well name clutter on map

3 participants