videx-3d
Version:
React 3D component library designed for sub surface visualizations in the browser
66 lines (65 loc) • 2.91 kB
TypeScript
import { ReadonlyStore } from '../Store';
import { StratColumnUnit, WellboreHeader } from '../types';
import { Pick } from '../types/Pick';
export type UnitPick = {
pick: Pick;
unit: StratColumnUnit;
};
export type FormationInterval = {
entry: Pick;
exit: Pick;
unit: StratColumnUnit;
};
export type FormationColumnInterval = {
mdMslTop: number;
mdMslBottom: number;
unit: StratColumnUnit;
};
export type FormationMarker = {
name: string;
color: string;
mdMsl: number;
tvdMsl?: number;
type: 'top' | 'base';
level: number;
};
/**
* Match picks bottom-up (wellbore -> parent chain) with stratigraphy units.
* As we traverse to a parent wellbore, ignore any picks that are deeper than
* the current pick depth or the child's kickoff depth.
*
* If a wellbore has picks above its kickoff depth, we prioritize these picks
* above corresponding picks from the parent wellbore
*
*/
export declare function getUnitPicks(wellboreId: string, stratColumnId: string, store: ReadonlyStore, traverse?: boolean, fromMsl?: number): Promise<{
matched: UnitPick[];
unmatched: Pick[];
wellbore: WellboreHeader;
} | null>;
/**
* Create groups of entry and exit picks for each stratigraphy unit level:
*
* - Sort the matched picks by ascending level and ascending depth
* - Traverse the matched picks, keeping a reference of the current level and unit to find the correct entry and exit pick
* - Remove picks from list as formations are identified
*/
export declare function createFormationIntervals(unitPicks: UnitPick[], maxDepth?: number): FormationInterval[];
/**
* Merge into a single column, where higher levels takes precedence over lower levels:
*
* - Sort the intervals by ascending entry depth and ascending stratigraphy unit level
* - Start with a stack containing the first item from the sorted list and keep track of the entry depth
* - iterate to find the next item that has an entry depth lower than current depth
* - define a range limit from the current depth and the entry of the item with a lower entry depth
* - pop the stack and draw sections while adjusting the current depth and keep doing this until the current depth reaches the range limit
* - any items on the stack with an exit md greater than the limit gets pushed back on the stack
* - the current item is pushed to the stack and the iteration continues
*/
export declare function mergeFormationIntervals(formationIntervals: FormationInterval[]): FormationColumnInterval[];
/**
* Identify surface entry picks, where the highest level picks has precedence:
* - Sort intervals by ascending entry depth and descending stratigraphy unit level
* - Pick only the first pick of a depth, ignoring any following picks with the same depth as the previous pick
*/
export declare function getFormationMarkers(intervals: FormationInterval[]): FormationMarker[];