Skip to content

feat: Subsurface viewer - Extended features for the Wells-layer#2696

Merged
Anders2303 merged 61 commits intoequinor:masterfrom
Anders2303:subsurface-viewer/wells-layer--rich-wells-layer
Feb 6, 2026
Merged

feat: Subsurface viewer - Extended features for the Wells-layer#2696
Anders2303 merged 61 commits intoequinor:masterfrom
Anders2303:subsurface-viewer/wells-layer--rich-wells-layer

Conversation

@Anders2303
Copy link
Copy Markdown
Collaborator

@Anders2303 Anders2303 commented Jan 22, 2026

image image

Extended the WellsLayer class with more settings and sub-layers:

  • Added a dashed-sections sublayer for showing parts of the trajectories as dashed

  • Added a trajectory-marker layer for visualizing trajectory perforations and screen starts and stops

    • The markers currently being rendered are only intended to look nice for 2D, but they do also work in 3D
  • Added "Screens" to the well-log JSON model's properties. Screens can be rendered as dashed sections

    • Toggled by the showScreenTrajectory property
    • Start and end markers are toggled by the showScreenMarkers property
  • Added "Perforations" to the well-log JSON model's properties, which can be shown as markers along the trajectory

    • Toggled by the showPerforationsMarkers property
  • Added "formations" to the well-log JSON model's properties. Not visualized, but can be used as a filter target

  • Added the option to filter well trajectories by various properties

    • Global MD values
    • Formations, filtering each well to only show the formation section
    • Well name

Do note that I've only made the filtering apply to the sublayers that we need it to internally, so some further work could be done for the rest of them

Anders2303 and others added 30 commits November 19, 2025 13:51
* Separated log curve visualization and selection to a dedicated composite layer
* Moved various local utils into utility files
* Changed accessors to use fractional positions.
* Implemented change-flags for accessors.
* Made picking info denote what dashed sections you are in
* Updated sub-layer story
@Anders2303 Anders2303 requested a review from w1nklr January 28, 2026 09:24
@Anders2303
Copy link
Copy Markdown
Collaborator Author

Anders2303 commented Jan 28, 2026

I want to get Knut's opinion about the filtering part.

@Midtveit any thoughts?

@hkfb
Copy link
Copy Markdown
Collaborator

hkfb commented Jan 30, 2026

I've tested the stories a bit, and it looks really nice! Some thoughts

  • @Midtveit has some thoughts about the perforations design and is requesting more control of the appearance (eg. perforation ranges, colors for open/closed, etc). But this is a good first step.
  • Re. the above point, the API of the wells layer becomes cluttered with so many options, especially if we want more control over the appearance of perforations, etc. I think it's more future proof to nest related props into single objects in order to avoid cluttering and to make the API easier to understand. I also understand the downsides, but my personal preference is to nest related properties.
  • In the formations example, it would be nice to be able to optionally show the formation logs (just the story, not built in to the layer)

Copy link
Copy Markdown
Collaborator

@w1nklr w1nklr left a comment

Choose a reason for hiding this comment

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

I went over all the code this time.
Many comments are given by VS code locally ;)

@Anders2303
Copy link
Copy Markdown
Collaborator Author

Many comments are given by VS code locally ;)
I not quite sure what you mean, @w1nklr ? Do you mean that these things been showing up as errors/warnings in your VS Code? None of these have been flagged on my end, which means we might have inconsistent editor settings. Shouldn't the linter configs ensure this doesn't happen?

@w1nklr
Copy link
Copy Markdown
Collaborator

w1nklr commented Feb 3, 2026

Many comments are given by VS code locally ;)
I not quite sure what you mean, @w1nklr ? Do you mean that these things been showing up as errors/warnings in your VS Code? None of these have been flagged on my end, which means we might have inconsistent editor settings. Shouldn't the linter configs ensure this doesn't happen?

Yes, the proposed changes in this review are (mostly) proposed by my VS code.
Some are coming from the linter, but others are from sonarqube (which is setup for our internal projects, but is also applied for whatever gets open with VS code).

Definitively, we should setup formal lint rules to add some consistency to our code (like enforcing naming rules, ordering imports, avoiding use of any...).

An example of such a change proposal:
image

@Anders2303
Copy link
Copy Markdown
Collaborator Author

Right, @w1nklr I resolved most of them, although there were some changes I'm not fully convinced are better... Are the remaining issues things that are being flagged, if so, I'll go along with them to make things easier; but we should make sure we sync up our linting rules soon to avoid that in the future

@Anders2303
Copy link
Copy Markdown
Collaborator Author

I've tested the stories a bit, and it looks really nice! Some thoughts

  • Midtveit has some thoughts about the perforations design and is requesting more control of the appearance (eg. perforation ranges, colors for open/closed, etc). But this is a good first step.
  • Re. the above point, the API of the wells layer becomes cluttered with so many options, especially if we want more control over the appearance of perforations, etc. I think it's more future proof to nest related props into single objects in order to avoid cluttering and to make the API easier to understand. I also understand the downsides, but my personal preference is to nest related properties.
  • In the formations example, it would be nice to be able to optionally show the formation logs (just the story, not built in to the layer)

@hkfb

  • Is it fine to leave it as is for this PR and open an issue to discuss future improvements? I did create a getMarkerColor accessor in the sublayer, I could expose that to atleast allow open/closed colors
  • Thats a fair point, especially when dealing with larger sub-layers like this. I'll change it to a nested object
  • Did you mean that I should show a log viewer track on the side, like this?
    image

@Anders2303
Copy link
Copy Markdown
Collaborator Author

Does this seem okay, @hkfb ? Technically the dashed sections and screen markers are two different layers, but I think its fair to put their settings together.

/* --- Screens and perforations --- --- --- --- ---*/
    markers?: {
        /** Enables simple line markers at the start and end of screen sections.
         *
         * **Note:** These markers are currently only designed for 2D, so they are not guaranteed to look nice in 3D
         */
        showScreens?: boolean;
        /**
         * Renders screen sections of the trajectory as dashed segments.
         *
         * **Note: If enabled, the COLORS sub-layer will be replaced by the SCREEN_TRAJECTORY sub-layer**
         */
        showScreenTrajectoryAsDash?: boolean;
        /** Specifies the dash factor for screen sections. */
        getScreenDashFactor?: DashAccessor;

        /** Enables visualization of trajectory perforations.
         *
         * **Note:** These markers are currently only designed for 2D, so they are not guaranteed to look nice in 3D
         */
        showPerforations?: boolean;

        /** Specifies colors of markers at a per-marker basis */
        getMarkerColor?: FlatWellMarkersLayerProps<WellFeature>["getMarkerColor"];
    };

Should we also create an object for the filter? I was thinking that we could consider keeping that flat since it very directly affects the top-level rendering of the entire well-layer, as opposed to labels, markers and such which are just a specific sublayer

@hkfb
Copy link
Copy Markdown
Collaborator

hkfb commented Feb 4, 2026

I've tested the stories a bit, and it looks really nice! Some thoughts

  • Midtveit has some thoughts about the perforations design and is requesting more control of the appearance (eg. perforation ranges, colors for open/closed, etc). But this is a good first step.
  • Re. the above point, the API of the wells layer becomes cluttered with so many options, especially if we want more control over the appearance of perforations, etc. I think it's more future proof to nest related props into single objects in order to avoid cluttering and to make the API easier to understand. I also understand the downsides, but my personal preference is to nest related properties.
  • In the formations example, it would be nice to be able to optionally show the formation logs (just the story, not built in to the layer)

@hkfb

  • Is it fine to leave it as is for this PR and open an issue to discuss future improvements? I did create a getMarkerColor accessor in the sublayer, I could expose that to atleast allow open/closed colors

I'm fine with that as long as it'll be easy to add later.

  • Thats a fair point, especially when dealing with larger sub-layers like this. I'll change it to a nested object
  • Did you mean that I should show a log viewer track on the side, like this?
    image

That's interesting, but I meant (optionally) showing the logs along the trajectory. It can help understand and QC the filtered formations.

@hkfb
Copy link
Copy Markdown
Collaborator

hkfb commented Feb 4, 2026

Does this seem okay, @hkfb ? Technically the dashed sections and screen markers are two different layers, but I think its fair to put their settings together.

/* --- Screens and perforations --- --- --- --- ---*/
    markers?: {
        /** Enables simple line markers at the start and end of screen sections.
         *
         * **Note:** These markers are currently only designed for 2D, so they are not guaranteed to look nice in 3D
         */
        showScreens?: boolean;
        /**
         * Renders screen sections of the trajectory as dashed segments.
         *
         * **Note: If enabled, the COLORS sub-layer will be replaced by the SCREEN_TRAJECTORY sub-layer**
         */
        showScreenTrajectoryAsDash?: boolean;
        /** Specifies the dash factor for screen sections. */
        getScreenDashFactor?: DashAccessor;

        /** Enables visualization of trajectory perforations.
         *
         * **Note:** These markers are currently only designed for 2D, so they are not guaranteed to look nice in 3D
         */
        showPerforations?: boolean;

        /** Specifies colors of markers at a per-marker basis */
        getMarkerColor?: FlatWellMarkersLayerProps<WellFeature>["getMarkerColor"];
    };

Should we also create an object for the filter? I was thinking that we could consider keeping that flat since it very directly affects the top-level rendering of the entire well-layer, as opposed to labels, markers and such which are just a specific sublayer

Ok, I'm good with this.

Tiny remark, I suggest using tsdoc syntax, eg. @remarks instead of "Note".

@w1nklr
Copy link
Copy Markdown
Collaborator

w1nklr commented Feb 4, 2026

I've tested the stories a bit, and it looks really nice! Some thoughts

* @Midtveit has some thoughts about the perforations design and is requesting more control of the appearance (eg. perforation ranges, colors for open/closed, etc). But this is a good first step.

I spoke with Knut yesterday.

The main point is that perforations are usually on an MD range and not at a single MD.
This means that PerforationProperties should have mdStart: number; and mdEnd: number; fields instead of single md.

If it's too much change for this PR, you can create a follow-up PR.

BTW, I'm also wondering if:

  • PerforationProperties.status should not be an string union for stronger typing (like "shot" | "closed" or "open" | "closed")
  • what is PerforationProperties.mode ?
  • FormationProperties could have same md names than ScreenProperties : mdStart and number;

These types should have a documentation also....

@Anders2303
Copy link
Copy Markdown
Collaborator Author

The last stuff should now have been fixed, although I left the perforation issue as is. Im unfamiliar with the domain specifics for this, so it probably be better if one of you do a the more specific changes regarding that in a new PR; we have another project that is waiting for this functionality, and as this PR covers our usecase, so it' be nice to resolve this PR if possible.

@Anders2303 Anders2303 requested a review from w1nklr February 4, 2026 15:00
@Anders2303
Copy link
Copy Markdown
Collaborator Author

As for the specific datatypes for sceens and perforations, the only thing we need is the dates and md points, so feel free to change those to whatever is needed

this.state.highlightedSourceIndex,
this.props.getLineColor,
this.props.getMarkerColor,
...(this.props.updateTriggers?.["getLineColor"] || []),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

?? should be preferred over ||

You can resolve.

@Anders2303
Copy link
Copy Markdown
Collaborator Author

Made an issue to track the remaining issues and other things #2705

@Anders2303 Anders2303 merged commit 72968b7 into equinor:master Feb 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CeeSol Task owned by Ceetron Solutions enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants