feat: Subsurface viewer - Extended features for the Wells-layer#2696
Conversation
* Separated log curve visualization and selection to a dedicated composite layer * Moved various local utils into utility files
…ation in marker layer to support 3d views
* 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
…grouped data structure
…rajectoryMarkerLayer
@Midtveit any thoughts? |
|
I've tested the stories a bit, and it looks really nice! Some thoughts
|
w1nklr
left a comment
There was a problem hiding this comment.
I went over all the code this time.
Many comments are given by VS code locally ;)
typescript/packages/subsurface-viewer/src/layers/wells/utils/trajectory.ts
Show resolved
Hide resolved
typescript/packages/subsurface-viewer/src/layers/wells/utils/trajectory.ts
Outdated
Show resolved
Hide resolved
typescript/packages/subsurface-viewer/src/layers/wells/utils/trajectory.ts
Outdated
Show resolved
Hide resolved
typescript/packages/subsurface-viewer/src/layers/wells/utils/trajectory.ts
Outdated
Show resolved
Hide resolved
typescript/packages/subsurface-viewer/src/layers/wells/utils/trajectory.ts
Outdated
Show resolved
Hide resolved
typescript/packages/subsurface-viewer/src/layers/wells/wellsLayer.ts
Outdated
Show resolved
Hide resolved
typescript/packages/subsurface-viewer/src/layers/wells/wellsLayer.ts
Outdated
Show resolved
Hide resolved
typescript/packages/subsurface-viewer/src/layers/wells/wellsLayer.ts
Outdated
Show resolved
Hide resolved
|
Yes, the proposed changes in this review are (mostly) proposed by my 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...). |
|
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 |
|
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 |
I'm fine with that as long as it'll be easy to add later. That's interesting, but I meant (optionally) showing the logs along the trajectory. It can help understand and QC the filtered formations. |
Ok, I'm good with this. Tiny remark, I suggest using tsdoc syntax, eg. |
I spoke with Knut yesterday. The main point is that perforations are usually on an MD range and not at a single MD. If it's too much change for this PR, you can create a follow-up PR. BTW, I'm also wondering if:
These types should have a documentation also.... |
|
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. |
|
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"] || []), |
There was a problem hiding this comment.
?? should be preferred over ||
You can resolve.
|
Made an issue to track the remaining issues and other things #2705 |



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
Added "Screens" to the well-log JSON model's properties. Screens can be rendered as dashed sections
showScreenTrajectorypropertyshowScreenMarkerspropertyAdded "Perforations" to the well-log JSON model's properties, which can be shown as markers along the trajectory
showPerforationsMarkerspropertyAdded "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
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