TheTechIdea OilGas - Developer guide User guide →

TheTechIdea.OilGas.Mapping

41 public types. Summaries come from the XML documentation of the compiled assembly.

TheTechIdea.OilGas.Mapping

TypeSummary
Bounds3structThe extent of a 3D scene in metres: X east, Y north, Z up (elevation above sea level).
Camera3DclassAn orbit camera. Azimuth is the compass direction the camera looks toward (clockwise from north), Elevation its height above the horizon (90 looks straight down, a plan view with east to the right and north up - the layout of the 2D map), Distance from the target to the eye. Vertical exaggeration scales Z about the origin before projection. Perspective and orthographic projections give the same size at the target, so switching does not make the picture jump.
ContourBandclassThe region of a surface between two contour levels: polygons (counter-clockwise, in map coordinates) that together cover exactly the part of the grid whose values lie in the band.
Contouringstatic classContour lines of a grid by marching squares, and the choice of the levels.
ContourLineclassOne contour line: the points along a level, and whether it closes on itself.
ContourMapViewclassA contour map on the shared drawing layer: the surface filled in the environment's colour ramp, contour lines (index contours heavier and labelled), wells, axes, a legend with the contour interval, a scale bar and a north arrow. Positions are in metres (a projected coordinate system), north is up. Theme, locale, labels and every presentation choice come from the environment (mapping.*).
CoordinateSystemclassA coordinate system built from a definition: converts between geographic coordinates (degrees, on the system's datum) and its map coordinates, in the system's linear unit. Methods: Transverse Mercator (the Krueger n-series to sixth order, Karney 2011; the EPSG guidance note 7-2 form), Lambert Conic Conformal with one or two standard parallels, Oblique Stereographic (all after EPSG guidance note 7-2), and "geographic" (X is the longitude, Y the latitude).
CoordinateSystemDefinitionclassA coordinate system as a definition: method (transverseMercator, lambertConformalConic, obliqueStereographic or geographic), datum or ellipsoid, and the projection's parameters in the units of the system (angles in degrees; false easting and northing in the system's linear unit).
CoordinateSystemsstatic classFinds coordinate systems by name: those defined in the environment (mapping.coordinateSystems), UTM zones (utm:38N) and geographic systems (geographic:WGS 84).
CoordinateTransformclassMoves coordinates from one coordinate system to another, shifting datum when they differ.
DatumDefinitionclassA geodetic datum: the ellipsoid it uses and, if known, how to reach WGS 84. Without a transformation no coordinate can be moved to or from another datum.
EllipsoidDefinitionclassAn ellipsoid of revolution (a datum's model of the Earth's shape): semi-major axis and inverse flattening (0 for a sphere).
Geodesystatic classGeodetic datum shifts by seven-parameter Helmert transformation through geocentric coordinates.
GridclassValues on a regular grid; a masked node is NaN.
Griddingstatic classGridding of scattered points: inverse-distance weighting (Shepard 1968) and minimum curvature as a biharmonic spline (Briggs 1974; Sandwell 1987).
GriddingMethodenumHow scattered points are turned into a surface.
GriddingResultclassA gridded surface and its checks.
GridQcclassChecks of a gridded surface against the data it came from.
GridSpecclassA regular grid's geometry: node (0, 0) at (X0, Y0), spacing Dx and Dy, Nx by Ny nodes.
HelmertTransformationclassA seven-parameter Helmert transformation of geocentric coordinates to WGS 84: translations (m), rotations (arc-seconds), scale difference (ppm).
Krigingstatic classOrdinary kriging (Matheron 1963): the best linear unbiased estimate of a value from its neighbours, and the variance of its error - which no other gridding method gives.
LagBinclassOne lag of an experimental variogram: the pairs of points whose separation falls in it.
MapBubbleclassA value shown as a bubble: its area is proportional to the value (a negative value is a hollow bubble of the same size rule).
MapColorsstatic classThe fill colours of a map: the environment's ramp (mapping.colorRamp, optionally reversed), blended between its stops and quantised into mapping.colorSteps bands.
MapExportstatic classExports a contour map as SVG, PDF or PNG (one page the size of the view; draw it at the origin).
MapLabelBoxclassThe place a label was drawn: its centre, its size, and its angle (degrees, clockwise on the screen), in the view's points.
MappingSettingsclassSettings of the mapping toolbox (environment section toolboxes.mapping). Map coordinates are in metres (a projected coordinate system).
MappingToolboxstatic classMapping toolbox: gridding, contour maps, maps from well data, 3D scenes.
MapWellclassA well (or any point) shown on a map.
ScatterPointstructA scattered data point: map position (metres) and value.
Scene3DclassA 3D scene: surfaces, well paths (drilled and planned) and picks, in one coordinate frame (X east, Y north, Z up, metres) and the map's coordinate system.
Scene3DViewclassA 3D view of a Scene3D drawn in software on the shared drawing layer (no GPU): surfaces as lit quads, well paths as lines, picks as markers, depth-sorted far to near (the painter's algorithm). Light, opacity, field of view, projection and vertical exaggeration are the environment's. Drag orbits, the wheel and a pinch zoom, a two-finger drag pans; the arrow keys orbit (with Shift they pan), plus and minus zoom, Home fits the scene.
SceneExportstatic classExports a Scene3D as glTF 2.0 (a .glb file, or .gltf with its data embedded) for any viewer: surfaces as triangle meshes with normals and vertex colours, well paths as line strips, picks as points. glTF is right-handed with Y up: X is easting, Y elevation, -Z northing. Coordinates are written relative to the scene's centre (a UTM easting of millions would lose its millimetres in 32 bits); the centre, the coordinate system and the vertical exaggeration are in the root node's extras, and the exaggeration is the root node's scale, so the data stay true. Every cell of a surface is kept (the view's cell limit applies to drawing only).
ScenePickclassA pick marked in a scene (for example a formation top on a well).
SceneSurfaceclassA gridded surface in a scene: depths below sea level on a grid, converted to elevation (metres, up) when drawn.
SceneWellPathclassA well path in a scene: points from the wellhead to the total depth (metres; X east, Y north, Z up).
VariogramclassA theoretical variogram: the nugget (the semivariance just beyond zero separation: measurement error and variation finer than the sampling), the sill (the semivariance beyond the range) and the practical range. The semivariance at zero separation is zero by definition, so a nugget makes the model discontinuous there, as the theory intends (Isaaks and Srivastava 1989; Cressie 1993).
VariogramModelenumThe shape of a variogram: how the semivariance rises with distance.
WellMapRowclassOne well's part of a map: where it is, what it contributes, or why it was left out.
WellMapsstatic classMaps made from well data: a formation top, the thickness between two tops, net pay, or any value per well. A pick is placed where the well really is - the wellhead plus the trajectory's offsets at the pick's measured depth, with the survey's azimuths brought to grid north - not at the wellhead. A well that cannot be placed or read is left out of the map with its reason in the table, never guessed at (mapping.assumeVerticalWhenNoSurvey and assumeWgs84WhenCrsUnknown are the explicit exceptions).
WellMapSetclassThe points of a map made from well data, with the table that says where each came from and which wells were left out and why.

Bounds3 struct

The extent of a 3D scene in metres: X east, Y north, Z up (elevation above sea level).

MemberSummary
Bounds3(double minX, double maxX, double minY, double maxY, double minZ, double maxZ)Creates a bounding box.
double MaxX { get; }East edge.
double MaxY { get; }North edge.
double MaxZ { get; }Highest elevation.
double MinX { get; }West edge.
double MinY { get; }South edge.
double MinZ { get; }Lowest elevation.

Camera3D class

An orbit camera. Azimuth is the compass direction the camera looks toward (clockwise from north), Elevation its height above the horizon (90 looks straight down, a plan view with east to the right and north up - the layout of the 2D map), Distance from the target to the eye. Vertical exaggeration scales Z about the origin before projection. Perspective and orthographic projections give the same size at the target, so switching does not make the picture jump.

MemberSummary
double Azimuth { get; set; }The direction the camera looks toward, degrees clockwise from north.
double Distance { get; set; }Distance from the target to the eye, metres.
double Elevation { get; set; }Height of the camera above the horizon, degrees (-90 to 90).
double FieldOfView { get; set; }Vertical field of view, degrees.
bool Orthographic { get; set; }Orthographic instead of perspective.
(double, double, double) Target { get; set; }The point looked at (scene coordinates, before vertical exaggeration).
void Fit(Bounds3 box, double viewWidth, double viewHeight, double verticalExaggeration = 1)Frames a scene: the target at its centre and the distance that keeps the whole box in a view of this size (its bounding sphere inside the narrower field of view).
void Orbit(double deltaAzimuth, double deltaElevation)Turns the camera about its target: azimuth and elevation in degrees (the elevation is held within -90 to 90).
void Pan(double dxPoints, double dyPoints, double viewHeight)Moves the target so the scene follows a drag of (dx, dy) screen points in a view of the given height.
(double, double, double)? Project(double x, double y, double z, double viewWidth, double viewHeight, double verticalExaggeration = 1)Where a point of the scene falls on a view of the given size: screen X and Y (points, Y down) and the depth along the view direction. Null when the point is behind the camera (perspective only).
void Zoom(double factor)Zooms: a factor above 1 comes closer.

ContourBand class

The region of a surface between two contour levels: polygons (counter-clockwise, in map coordinates) that together cover exactly the part of the grid whose values lie in the band.

MemberSummary
double Area { get; }The area of the band, in map units squared.
double Lower { get; set; }The level the band starts at (negative infinity for the lowest band).
List<List<(double, double)>> Polygons { get; }The polygons. A band may be several pieces, and the pieces of neighbouring cells abut exactly; drawn as one path they leave no seams.
double Upper { get; set; }The level the band ends at (positive infinity for the highest band).

Contouring static class

Contour lines of a grid by marching squares, and the choice of the levels.

MemberSummary
static List<ContourBand> Bands(Grid grid, IReadOnlyList<double> levels)The bands of a surface between the given levels (ascending): one more band than there are levels, the lowest running down from the first level and the highest up from the last. Each grid cell is treated as four triangles round its centre, whose value is the mean of its corners - the rule that also settles a saddle in Double) - and the surface is the piecewise-linear interpolation of them. A cell wholly inside one band is a rectangle (merged with its neighbours along the row); a cell that crosses levels is cut at each by linear interpolation. A cell with a blank corner is left out, as in the lines.
static double Interval(double range, string valueUnit = "")The contour interval in effect for a range of values.
static List<(double, bool)> Levels(double min, double max, string valueUnit = "")The contour levels for values from min to max: multiples of the interval (mapping.contourInterval, converted to valueUnit when both are lengths; none: a round interval giving about mapping.targetContours lines) that lie strictly inside the range. Each is flagged an index contour every mapping.indexContourEvery intervals.
static List<(double, bool)> Levels(double min, double max, double interval, int indexEvery)The contour levels for an interval and an index frequency given outright (an exercise states them, so its answer does not depend on the machine's settings): multiples of the interval strictly inside the range, every indexEvery-th an index contour (0: none).
static double NiceInterval(double range, int targetContours)The round interval (1, 2 or 5 times a power of ten) that gives about targetContours lines over a range of values (Heckbert 1990).
static List<ContourLine> Trace(Grid grid, string valueUnit = "")The contour lines of a grid at the levels of String) for its own range.
static List<ContourLine> Trace(Grid g, double level)The contour lines of a grid at the levels of String) for its own range.
static List<ContourLine> Trace(Grid grid, double interval, int indexEvery)The contour lines of a grid at an interval and index frequency given outright.

ContourLine class

One contour line: the points along a level, and whether it closes on itself.

MemberSummary
bool Closed { get; set; }Whether the line closes on itself (otherwise it runs off the grid or into a masked area).
bool IsIndex { get; set; }Whether it is an index contour (heavier, labelled).
double Length { get; }The length along the line, in map units.
double Level { get; set; }The value the line follows.
List<(double, double)> Points { get; }The points, in map coordinates; a closed line does not repeat its first point.

ContourMapView class

A contour map on the shared drawing layer: the surface filled in the environment's colour ramp, contour lines (index contours heavier and labelled), wells, axes, a legend with the contour interval, a scale bar and a north arrow. Positions are in metres (a projected coordinate system), north is up. Theme, locale, labels and every presentation choice come from the environment (mapping.*).

Inherits / implements: ViewSurface

MemberSummary
List<MapBubble> Bubbles { get; }Bubbles (a value per well; cumulative production, say), over the map or on their own.
double? ContourInterval { get; set; }The contour interval, in ValueUnit, when it is to be fixed here rather than follow the environment (an exercise states its interval so its answer does not depend on the machine).
GridSpec Extent { get; set; }The area to map when there is no surface (a bubble map): none, and it is taken from the wells and bubbles plus mapping.extentMargin.
int? IndexContourEvery { get; set; }Every n-th contour is an index contour, when fixed here rather than following the environment (0: none).
IReadOnlyList<MapLabelBox> LabelBoxes { get; }Where the labels of the last drawing went (contour, well and bubble labels, in the view's points): no two overlap, none leaves the map. Empty until the view has been drawn.
string ScaleBarUnit { get; set; }The unit family of the scale bar, "m" (metres and kilometres) or "ft" (feet and miles), when it is to be fixed here rather than follow the environment's depth unit (an exercise whose coordinates and answers are in metres must not show feet because of the machine it runs on).
bool ShowContours { get; set; }Draw the contour lines.
bool ShowFill { get; set; }Fill the surface with colour.
bool ShowLabels { get; set; }Label the index contours.
bool ShowLegend { get; set; }Draw the legend.
bool ShowNorthArrow { get; set; }Draw the north arrow.
bool ShowScaleBar { get; set; }Draw the scale bar.
bool ShowWells { get; set; }Draw the wells.
Grid Surface { get; set; }The surface to draw (masked nodes are left blank).
string Title { get; set; }Title above the map.
string ValueUnit { get; set; }Unit of the mapped values, shown in the legend (the environment's depth unit unless set).
List<MapWell> Wells { get; }Wells (or other points) to show.
static double BubbleRadius(double value, double largestAbsoluteValue)The radius (points) of the bubble for a value: area proportional to the value, the largest value at mapping.bubbleMaxRadius, none below mapping.bubbleMinRadius.

CoordinateSystem class

A coordinate system built from a definition: converts between geographic coordinates (degrees, on the system's datum) and its map coordinates, in the system's linear unit. Methods: Transverse Mercator (the Krueger n-series to sixth order, Karney 2011; the EPSG guidance note 7-2 form), Lambert Conic Conformal with one or two standard parallels, Oblique Stereographic (all after EPSG guidance note 7-2), and "geographic" (X is the longitude, Y the latitude).

MemberSummary
string DatumName { get; }The datum's name, if the definition names one.
CoordinateSystemDefinition Definition { get; }The definition it was built from.
EllipsoidDefinition Ellipsoid { get; }Its ellipsoid.
string Name { get; }The name.
HelmertTransformation ToWgs84 { get; }Its datum's transformation to WGS 84, if known.
const string AxesHelp = "en, wn, ws, es - or, with the north-south coordinate first, ne, nw, sw, se"What axes may be: the directions x and y increase in, written as two letters (one of e or w, one of n or s), the first for x.
static IReadOnlyList<string> KnownMethodsThe methods a definition may name (plus "geographic"): each is a projection of the engine, and a coordinate system is a definition that names one.
static CoordinateSystem Create(string name, CoordinateSystemDefinition def)Builds a system from a definition; the datum and its ellipsoid come from the environment (mapping.datums, mapping.ellipsoids) unless the definition gives its own ellipsoid.
(double, double) FromGeographic(double latitude, double longitude)Map coordinates of a position given as latitude and longitude (degrees) on this system's datum; for a geographic system (longitude, latitude).
(double, double) ToGeographic(double x, double y)Latitude and longitude (degrees, on this system's datum) of a map position.
static bool ValidAxes(string axes)Whether a string names valid axes.

CoordinateSystemDefinition class

A coordinate system as a definition: method (transverseMercator, lambertConformalConic, obliqueStereographic or geographic), datum or ellipsoid, and the projection's parameters in the units of the system (angles in degrees; false easting and northing in the system's linear unit).

MemberSummary
string Axes { get; set; }The directions x and y increase in: en (east, north: the usual), wn, ws, es - or, with the north-south coordinate first, ne, nw, sw, se. The same projection with its axes turned - the "south orientated" and "west orientated" systems of South Africa, Namibia, Greenland, and Krovak (south, west) - and the false easting is always added to the east-west coordinate.
double? Azimuth { get; set; }Azimuth of the initial line at the projection centre, degrees (Hotine oblique Mercator).
double? ConeAxisColatitude { get; set; }Co-latitude of the cone axis, degrees (Krovak).
string Datum { get; set; }Name of a datum in mapping.datums (needed to move coordinates to another datum).
EllipsoidDefinition Ellipsoid { get; set; }An ellipsoid given here instead of through the datum (a system whose datum is not needed).
double EllipsoidScalingFactor { get; set; }The ellipsoid scaling factor: every length is multiplied by it (the Lambert conic of Michigan, 1.0000382). 1 for everything else.
double FalseEasting { get; set; }False easting, in the system's linear unit.
double FalseNorthing { get; set; }False northing, in the system's linear unit.
double? FalseOriginLatitude { get; set; }The latitude of the false origin when it is not the latitude of the natural origin (Lambert conic, one standard parallel, variant B); none: the latitude of origin.
double LatitudeOfOrigin { get; set; }Latitude of the (natural or false) origin, degrees.
double LinearUnitMetres { get; set; }Metres in one unit of the system's coordinates (1 for metres; 0.3048006096012192 for US survey feet).
double LongitudeOfOrigin { get; set; }Longitude of the origin / central meridian, degrees.
string Method { get; set; }A projection method of the engine (see CoordinateSystem.KnownMethods and the documentation page), or geographic (longitude, latitude in degrees).
double PrimeMeridian { get; set; }The prime meridian the system's longitudes (its longitudeOfOrigin too) are counted from, in degrees east of Greenwich: 0 for Greenwich, -17.66667 for Ferro, 2.33722917 for Paris, 10.72291667 for Oslo. The program's own longitudes are always from Greenwich.
double ProjectionPlaneHeight { get; set; }The height of the projection plane's origin above the ellipsoid, metres (Colombia Urban: lengths are carried up to that plane).
double? PseudoStandardParallel { get; set; }Latitude of the pseudo standard parallel, degrees (Krovak).
double? RectifiedGridAngle { get; set; }Angle from the rectified to the skew grid, degrees (Hotine oblique Mercator); none: the azimuth.
double ScaleFactor { get; set; }Scale factor at the origin (not used by a two-standard-parallel Lambert).
double? StandardParallel1 { get; set; }First standard parallel, degrees: Lambert with two, Albers (both), Mercator variant B and polar stereographic variant B (the latitude of true scale).
double? StandardParallel2 { get; set; }Second standard parallel (Lambert with two, Albers), degrees.

CoordinateSystems static class

Finds coordinate systems by name: those defined in the environment (mapping.coordinateSystems), UTM zones (utm:38N) and geographic systems (geographic:WGS 84).

MemberSummary
static IReadOnlyList<string> DefinedNames()The names the environment defines (UTM and geographic names are generated and not listed).
static CoordinateSystem Get(string name)The system of that name; an unknown name is an error that says what is known.
static CoordinateSystem Utm(int zone, bool north, string datum = "WGS 84")A Universal Transverse Mercator zone (6 degrees wide, scale 0.9996 on the central meridian, false easting 500 000 m, false northing 0 m north and 10 000 000 m south).

CoordinateTransform class

Moves coordinates from one coordinate system to another, shifting datum when they differ.

MemberSummary
bool ShiftsDatum { get; }Whether the transform changes datum.
(double, double) Apply(double x, double y)Coordinates in the target system of a position given in the source system.
static CoordinateTransform Between(CoordinateSystem from, CoordinateSystem to)The transform from one system to another. Systems on the same datum (or the same ellipsoid with no datum named) need no shift. Otherwise both datums need a transformation to WGS 84; without one the transform is refused - guessing a datum shift would put a well hundreds of metres from where it is.

DatumDefinition class

A geodetic datum: the ellipsoid it uses and, if known, how to reach WGS 84. Without a transformation no coordinate can be moved to or from another datum.

MemberSummary
string Ellipsoid { get; set; }Name of an ellipsoid in mapping.ellipsoids.
HelmertTransformation ToWgs84 { get; set; }The transformation to WGS 84; none: the datum cannot be transformed.

EllipsoidDefinition class

An ellipsoid of revolution (a datum's model of the Earth's shape): semi-major axis and inverse flattening (0 for a sphere).

MemberSummary
double A { get; set; }Semi-major axis (m).
double InverseFlattening { get; set; }Inverse flattening 1/f (0 for a sphere).

Geodesy static class

Geodetic datum shifts by seven-parameter Helmert transformation through geocentric coordinates.

MemberSummary
static (double, double, double) FromWgs84(double lat, double lon, double h, EllipsoidDefinition to, HelmertTransformation t)A WGS 84 position moved to another datum - the inverse of HelmertTransformation).
static (double, double, double) ToWgs84(double lat, double lon, double h, EllipsoidDefinition from, HelmertTransformation t)A position on another datum (latitude, longitude, ellipsoidal height) moved to WGS 84 by the datum's Helmert transformation.

Grid class

Values on a regular grid; a masked node is NaN.

MemberSummary
Grid(GridSpec spec)Creates a grid of NaN.
int MaskedCount { get; }Number of masked (NaN) nodes.
double Max { get; }The largest value (NaN nodes ignored); NaN when every node is masked.
double Min { get; }The smallest value (NaN nodes ignored); NaN when every node is masked.
GridSpec Spec { get; }The geometry.
double Bilinear(double x, double y)The surface at (x, y) by bilinear interpolation of the four surrounding nodes; NaN outside the grid or next to a masked node.
Grid Minus(Grid other)This grid minus another of the same geometry (a thickness map from two surfaces); NaN where either is.
double X(int ix)Easting of column ix.
double Y(int iy)Northing of row iy.

Gridding static class

Gridding of scattered points: inverse-distance weighting (Shepard 1968) and minimum curvature as a biharmonic spline (Briggs 1974; Sandwell 1987).

MemberSummary
static GriddingResult Run(IReadOnlyList<ScatterPoint> points, GriddingMethod method, GridSpec spec = null)Grids the points on spec (the grid of ScatterPoint}) when null).

GriddingMethod enum

How scattered points are turned into a surface.

MemberSummary
InverseDistanceInverse-distance weighting (Shepard 1968): a weighted mean of the data - exact at the data, never beyond their range, but flat at every datum.
MinimumCurvatureMinimum curvature (Briggs 1974): the smoothest surface through the data, the solution of the biharmonic equation - here as the biharmonic (thin-plate) spline solved directly (Sandwell 1987). Exact at the data and exact for a plane, but it can swing beyond the data between them (Smith and Wessel 1990).
OrdinaryKrigingOrdinary kriging (Matheron 1963): the best linear unbiased estimate from a model of how values correlate with distance (a variogram, given or fitted), and the only method that also says how uncertain each node is: StandardDeviation is the grid of the error's standard deviation. Exact at the data; it smooths between them as much as the data's own spatial structure says to.

GriddingResult class

A gridded surface and its checks.

MemberSummary
Grid Grid { get; set; }The surface.
List<string> Notes { get; }What the method did that the reader should know (points merged, ...).
GridQc Qc { get; set; }The checks.
Grid StandardDeviation { get; set; }For kriging, the standard deviation of the error of each node (in the data's unit): zero at a datum, rising to the sill's square root and beyond away from the data. Null for the other methods.
Variogram Variogram { get; set; }For kriging, the variogram used - given by the settings or fitted to the data.

GridQc class

Checks of a gridded surface against the data it came from.

MemberSummary
double DataMax { get; set; }Largest datum.
double DataMin { get; set; }Smallest datum.
Grid DistanceToNearest { get; set; }The distance (m) from each node to the nearest datum - how far each part of the map is from any evidence.
double GridMax { get; set; }Largest value of the surface.
double GridMin { get; set; }Smallest value of the surface.
int MaskedNodes { get; set; }Nodes left blank by mapping.maxExtrapolationDistance.
double MaxAbsResidual { get; set; }The surface minus the datum at each point (bilinear on the grid): the largest absolute value.
double MaxDistanceToData { get; set; }The farthest any node is from a datum (m).
int MergedDuplicates { get; set; }Points that coincided with another (within mapping.coincidentTolerance) and were averaged into it.
bool OvershootsData { get; }Whether the surface goes beyond the range of the data (minimum curvature may; inverse-distance weighting cannot).
int PointCount { get; set; }Points gridded (after merging coincident ones).
List<(ScatterPoint, double)> Residuals { get; }The residual at every point (surface minus datum); NaN for a point outside the grid or on a masked node.
double RmsResidual { get; set; }Root mean square of the residuals.

GridSpec class

A regular grid's geometry: node (0, 0) at (X0, Y0), spacing Dx and Dy, Nx by Ny nodes.

MemberSummary
double Dx { get; set; }Spacing in x.
double Dy { get; set; }Spacing in y.
int Nx { get; set; }Nodes in x.
int Ny { get; set; }Nodes in y.
double X0 { get; set; }Easting of node (0, 0).
double X1 { get; }Easting of the last column.
double Y0 { get; set; }Northing of node (0, 0).
double Y1 { get; }Northing of the last row.
static GridSpec FromPoints(IReadOnlyList<ScatterPoint> points)The grid that covers the points: their extent plus mapping.extentMargin on every side, cells of mapping.gridCellSize (none: the longer side of the extent in mapping.defaultCellCount cells).
bool SameAs(GridSpec o)Whether another grid has exactly this geometry (a thickness map subtracts two grids of one geometry).

HelmertTransformation class

A seven-parameter Helmert transformation of geocentric coordinates to WGS 84: translations (m), rotations (arc-seconds), scale difference (ppm).

MemberSummary
string Convention { get; set; }Sign convention of the rotations: "positionVector" (EPSG 9606, the usual one) or "coordinateFrame" (EPSG 9607).
double Rx { get; set; }Rotation about X (arc-seconds).
double Ry { get; set; }Rotation about Y (arc-seconds).
double Rz { get; set; }Rotation about Z (arc-seconds).
double Scale { get; set; }Scale difference (parts per million).
double Tx { get; set; }Translation along X (m).
double Ty { get; set; }Translation along Y (m).
double Tz { get; set; }Translation along Z (m).

Kriging static class

Ordinary kriging (Matheron 1963): the best linear unbiased estimate of a value from its neighbours, and the variance of its error - which no other gridding method gives.

MemberSummary
static (double, double) Predict(IReadOnlyList<ScatterPoint> data, Variogram variogram, double x, double y, int? neighbours = null)The kriged value at (x, y) and its kriging variance (the expected squared error, in the data's unit squared), from the neighbours points nearest to it (all when null). The weights solve the ordinary kriging system - the semivariances between the points, bordered by the condition that the weights sum to one - and the variance is the weights times the semivariances to the point plus the Lagrange multiplier. A point on a datum is the datum, with variance zero.

LagBin class

One lag of an experimental variogram: the pairs of points whose separation falls in it.

MemberSummary
double Distance { get; set; }The mean separation of the pairs (in the coordinates' unit).
int Pairs { get; set; }The number of pairs.
double Semivariance { get; set; }Matheron's estimator: half the mean squared difference of the pairs' values.

MapBubble class

A value shown as a bubble: its area is proportional to the value (a negative value is a hollow bubble of the same size rule).

MemberSummary
string Label { get; set; }Name shown beside the bubble.
double Value { get; set; }The value the bubble's area stands for.
double X { get; set; }Easting (m).
double Y { get; set; }Northing (m).

MapColors static class

The fill colours of a map: the environment's ramp (mapping.colorRamp, optionally reversed), blended between its stops and quantised into mapping.colorSteps bands.

MemberSummary
static SKColor At(double fraction)The colour for a value at fraction (0 = lowest, 1 = highest) of the range.

MapExport static class

Exports a contour map as SVG, PDF or PNG (one page the size of the view; draw it at the origin).

MemberSummary
static void ToPdf(ContourMapView view, Stream stream)The map as a one-page PDF.
static void ToPng(ContourMapView view, Stream stream, WellborePrintOptions options = null)The map as a PNG at the environment's print resolution (printing.dpi) unless options say otherwise.
static void ToSvg(ContourMapView view, Stream stream)The map as a vector SVG.

MapLabelBox class

The place a label was drawn: its centre, its size, and its angle (degrees, clockwise on the screen), in the view's points.

MemberSummary
MapLabelBox(string text, double centerX, double centerY, double width, double height, double angleDegrees)Creates a label box.
double AngleDegrees { get; }Angle of the text, degrees.
double CenterX { get; }Centre, across.
double CenterY { get; }Centre, down.
double Height { get; }Height across the text.
string Text { get; }The label's text (empty for the symbol of a well or a bubble that labels are kept clear of).
double Width { get; }Width along the text.

MappingSettings class

Settings of the mapping toolbox (environment section toolboxes.mapping). Map coordinates are in metres (a projected coordinate system).

MemberSummary
bool AssumeVerticalWhenNoSurvey { get; set; }A well with no survey: false skips it (its picks cannot be placed); true takes it as vertical, true vertical depth equal to measured depth.
bool AssumeWgs84WhenCrsUnknown { get; set; }A well header's latitude and longitude are WGS 84 unless its Crs names a geographic system. When the Crs names something this environment does not define: false skips the well (a wrong datum can move it hundreds of metres); true takes it as WGS 84.
double BubbleMaxRadius { get; set; }Radius, in points, of the bubble of the largest value of a bubble map (area is proportional to the value).
double BubbleMinRadius { get; set; }Radius, in points, below which no bubble is drawn smaller, so a small value stays visible.
Measure CoincidentTolerance { get; set; }Points closer to one another than this are one point (their values are averaged): two values at one position would contradict each other and make the spline singular.
List<string> ColorRamp { get; set; }The colours of the map fill, low to high, as #RRGGBB; blended between. The default is viridis (perceptually uniform, readable with colour-vision deficiency).
int ColorSteps { get; set; }The number of distinct fill colours of the cell fill. (A banded fill has one colour per band, as many as there are contour levels.)
Measure ContourInterval { get; set; }Contour interval, in the unit of the mapped values (a length unit converts to the map's unit; an empty unit means the map's own). None: a "nice" interval giving about TargetContours lines (Heckbert 1990).
double ContourLabelMinLength { get; set; }A contour is labelled only if it is at least this many label widths long, so a short stub is not buried in its own label.
double ContourLineWidth { get; set; }Line weight of an ordinary contour (points).
Dictionary<string, CoordinateSystemDefinition> CoordinateSystems { get; set; }Coordinate systems by name (any name: an EPSG code, a national grid, your project grid). UTM zones need no entry: utm:38N, utm:12S.
Dictionary<string, DatumDefinition> Datums { get; set; }The datums coordinate systems refer to. WGS 84 ships; add yours with the transformation to WGS 84 your survey department uses.
int DefaultCellCount { get; set; }Cells across the longer side of the data's extent when no cell size is set.
Dictionary<string, EllipsoidDefinition> Ellipsoids { get; set; }The ellipsoids coordinate systems and datums refer to. Well-known ones ship as defaults; add your own, or override.
double ExtentMargin { get; set; }Margin added on every side of the data's extent, as a fraction of that extent (0.1 = 10 %), so a map reaches beyond its outermost data.
double FieldOfView { get; set; }Vertical field of view of the perspective camera, degrees.
string FillStyle { get; set; }How a surface is filled: bands (filled contours: polygons between the contour levels, one colour each) or cells (each grid cell in the colour of its value).
Measure GridCellSize { get; set; }Grid cell size. None: the longer side of the data's extent is divided into 100 cells (a presentation rule, not a property of the data).
int? IdwNeighbours { get; set; }Inverse-distance weighting: the number of nearest points used for each node. None: every point (global Shepard).
double IdwPower { get; set; }Inverse-distance weighting: the power p of the weights 1 / d^p. 2 is Shepard's (1968) classical choice; a larger power makes each datum's influence more local.
int IndexContourEvery { get; set; }Every n-th contour is an index contour: heavier, and labelled. 0: none. Five is the cartographic convention of topographic maps.
double IndexContourLineWidth { get; set; }Line weight of an index contour (points).
int? KrigingNeighbours { get; set; }Kriging: the nearest points used per node; none: all points.
double LabelClearance { get; set; }The room, in points, kept clear round a label: no label is placed closer than this to another label or to a symbol.
double LightAzimuth { get; set; }Direction the light comes from, degrees clockwise from north. 315 (north-west) is the cartographic hillshade convention.
double LightElevation { get; set; }Height of the light above the horizon, degrees. 45 is the cartographic hillshade convention.
string MapCoordinateSystem { get; set; }The coordinate system maps are made in (a name of mapping.coordinateSystems, or utm:38N). None: the UTM zone of the centre of the wells (on WGS 84), which works anywhere but not across a zone boundary - name one for a field that straddles it.
Measure MaxExtrapolationDistance { get; set; }Nodes farther than this from the nearest datum are left blank (masked). None: nothing is masked - and every node is a guess beyond the data, which the QC reports.
int MaxGridNodes { get; set; }The most nodes a grid may have; a finer request is refused rather than allowed to exhaust memory.
double? MaxKrigingStdDev { get; set; }Kriging: nodes whose standard deviation of the error exceeds this (in the data's unit) are left blank - the uncertainty as a mask.
int MaxSplinePoints { get; set; }Largest number of points the biharmonic spline will take: it solves a dense system whose cost grows with the cube of the count (Sandwell 1987: a few thousand). Beyond it use inverse-distance weighting or fewer points.
int MaxSurfaceCells { get; set; }The most cells a 3D surface is drawn with; a finer grid is thinned by a whole stride (the export keeps every cell).
string Projection { get; set; }perspective or orthographic.
bool ReverseColorRamp { get; set; }Run the ramp from high to low (depth maps often show the deep end in the dark colour).
string StructureDepth { get; set; }The depth a structure map shows: tvdss (true vertical depth below sea level; needs the depth datum's elevation), tvd (below the depth datum) or md (measured depth).
double SurfaceOpacity { get; set; }How opaque a 3D surface is (1 is solid): below 1 the wells behind a surface show through.
int TargetContours { get; set; }About how many contour lines an automatic interval should give.
int VariogramLags { get; set; }Kriging: the number of lags of the experimental variogram a fit uses.
string VariogramModel { get; set; }Kriging: the variogram model - spherical, exponential or gaussian.
double? VariogramNugget { get; set; }Kriging: the variogram's nugget (the data's unit squared). Given only together with the sill and the range; when they are not given the whole variogram is fitted to the data.
Measure VariogramRange { get; set; }Kriging: the variogram's practical range. Given together with the sill, or not at all.
double? VariogramSill { get; set; }Kriging: the variogram's sill (the total, the nugget included; the data's unit squared). Given together with the range, or not at all.
double VerticalExaggeration { get; set; }Vertical exaggeration of 3D scenes (1 is true scale). Reservoirs are far wider than they are thick, so a flat structure often needs 2 to 5 to be seen; the scene says when it is not 1.
double WellLineWidth { get; set; }Line weight of a well path in a 3D scene (points).
Measure WellPathStep { get; set; }Spacing of the points along a well path in a 3D scene. None: 30 m, or 100 ft when the depth unit is feet.

MappingToolbox static class

Mapping toolbox: gridding, contour maps, maps from well data, 3D scenes.

MemberSummary
static MappingSettings Settings { get; }The toolbox's settings in the current environment.
const string Name = "mapping"Section name in the environment's toolboxes.
static void Register()Registers the toolbox with the environment (idempotent); hosts call it at start-up, the toolbox's own entry points call it too.

MapWell class

A well (or any point) shown on a map.

MemberSummary
string Label { get; set; }Name shown beside the symbol.
double X { get; set; }Easting (m).
double Y { get; set; }Northing (m).

ScatterPoint struct

A scattered data point: map position (metres) and value.

MemberSummary
ScatterPoint(double x, double y, double z, string label = null)Creates a point.
string Label { get; }What the point is (a well name).
double X { get; }Easting (m).
double Y { get; }Northing (m).
double Z { get; }The value (a depth, a thickness, a net pay ...).

Scene3D class

A 3D scene: surfaces, well paths (drilled and planned) and picks, in one coordinate frame (X east, Y north, Z up, metres) and the map's coordinate system.

MemberSummary
CoordinateSystem MapSystem { get; set; }The coordinate system of X and Y; set by the first wells added and then kept, so every part of the scene shares one frame.
List<string> Notes { get; }Things the reader should know (a well that is not shown, and why).
List<ScenePick> Picks { get; }The picks.
List<SceneSurface> Surfaces { get; }The surfaces.
List<SceneWellPath> Wells { get; }The well paths.
void AddPicks(IEnumerable<WellModel> wells, string topName)Marks the pick of a formation top on each well, at its position along the trajectory and its depth below sea level.
SceneSurface AddSurface(Grid depths, string valueUnit, string name, SKColor? color = null)Adds a surface given as depths below sea level (positive down) in valueUnit.
void AddWells(IEnumerable<WellModel> wells, bool planned = false)Adds the wells' paths from wellhead to total depth, placed as the maps place them (the same coordinate system, survey and north handling). A well that cannot be placed is not shown; the notes say why.
Bounds3? Bounds()The box around everything in the scene (X, Y and elevation in metres); null for an empty scene.

Scene3DView class

A 3D view of a Scene3D drawn in software on the shared drawing layer (no GPU): surfaces as lit quads, well paths as lines, picks as markers, depth-sorted far to near (the painter's algorithm). Light, opacity, field of view, projection and vertical exaggeration are the environment's. Drag orbits, the wheel and a pinch zoom, a two-finger drag pans; the arrow keys orbit (with Shift they pan), plus and minus zoom, Home fits the scene.

Inherits / implements: ViewSurface

MemberSummary
IReadOnlyList<AccessibleItem> AccessibleChildren { get; }The view's elements (tracks, wells...) with their state, for assistive technology.
string AccessibleDescription { get; }What the view shows now, for screen readers (updated with the view).
Camera3D Camera { get; }The camera (framed on the scene the first time the view is drawn).
Scene3D Scene { get; set; }The scene.
bool ShowAxes { get; set; }Draw the box around the scene with its ranges.
bool ShowLegend { get; set; }Draw the list of surfaces with their depth ranges.
bool ShowPicks { get; set; }Draw the picks.
bool ShowWellLabels { get; set; }Name the wells.
string Title { get; set; }Title above the view.
double VerticalExaggeration { get; set; }Vertical exaggeration (the environment's unless set).
void FitToScene()Frames the whole scene.
bool HandleKey(ViewKey key, ViewModifiers modifiers = None)A key with modifiers; true when handled (the host redraws). See each view for its keys.
bool HandleMouseWheel(SKPoint point, float delta)Wheel over the view (delta &gt; 0 = away from the user); true when consumed.
bool HandlePinch(SKPoint center, float scale)Touch pinch about center; scale &gt; 1 spreads the fingers (zoom in) - relative to the previous event.
bool HandleTwoFingerPan(SKPoint delta)Two-finger drag by delta pixels since the previous event (scrolls / pans).

SceneExport static class

Exports a Scene3D as glTF 2.0 (a .glb file, or .gltf with its data embedded) for any viewer: surfaces as triangle meshes with normals and vertex colours, well paths as line strips, picks as points. glTF is right-handed with Y up: X is easting, Y elevation, -Z northing. Coordinates are written relative to the scene's centre (a UTM easting of millions would lose its millimetres in 32 bits); the centre, the coordinate system and the vertical exaggeration are in the root node's extras, and the exaggeration is the root node's scale, so the data stay true. Every cell of a surface is kept (the view's cell limit applies to drawing only).

MemberSummary
static void ToGlb(Scene3D scene, Stream stream)Writes a binary glTF (.glb) with the environment's vertical exaggeration.
static void ToGlb(Scene3D scene, Stream stream, double verticalExaggeration)Writes a binary glTF (.glb).
static void ToGltf(Scene3D scene, Stream stream)Writes a glTF (.gltf, JSON) with the geometry embedded as a data URI, with the environment's vertical exaggeration.
static void ToGltf(Scene3D scene, Stream stream, double verticalExaggeration)Writes a glTF (.gltf, JSON) with the geometry embedded as a data URI.

ScenePick class

A pick marked in a scene (for example a formation top on a well).

MemberSummary
string Label { get; set; }Label.
double X { get; set; }Easting (m).
double Y { get; set; }Northing (m).
double Z { get; set; }Elevation (m, up).

SceneSurface class

A gridded surface in a scene: depths below sea level on a grid, converted to elevation (metres, up) when drawn.

MemberSummary
(double, double) DepthRangeMetres { get; set; }Shallowest and deepest depth, metres.
Grid Depths { get; set; }The depths below sea level (positive down), in ValueUnit; a masked node is NaN.
double MetresPerUnit { get; set; }Metres per unit of depth.
string Name { get; set; }Name.
SKColor? SolidColor { get; set; }One colour for the whole surface; none: the colour ramp by depth.
string ValueUnit { get; set; }Unit of the depths.
double Elevation(int i, int j)Elevation (metres, up) of a node.

SceneWellPath class

A well path in a scene: points from the wellhead to the total depth (metres; X east, Y north, Z up).

MemberSummary
string Name { get; set; }Well name.
bool Planned { get; set; }A planned well (drawn dashed) rather than a drilled one.
List<(double, double, double)> Points { get; }The points, top down.

Variogram class

A theoretical variogram: the nugget (the semivariance just beyond zero separation: measurement error and variation finer than the sampling), the sill (the semivariance beyond the range) and the practical range. The semivariance at zero separation is zero by definition, so a nugget makes the model discontinuous there, as the theory intends (Isaaks and Srivastava 1989; Cressie 1993).

MemberSummary
VariogramModel Model { get; set; }The model.
double Nugget { get; set; }The nugget, at least zero.
double PartialSill { get; }The part of the sill that carries spatial correlation (sill minus nugget).
double Range { get; set; }The practical range, in the coordinates' unit.
double Sill { get; set; }The sill: the total semivariance beyond the range (the nugget included).
static List<LagBin> Empirical(IReadOnlyList<ScatterPoint> points, int lagCount, double? maxLag = null)The experimental variogram of the points: Matheron's estimator in lagCount equal lags up to maxLag (half the largest separation when null - beyond that the pairs come only from the points near the edges). Lags with no pair are left out.
static Variogram Fit(IReadOnlyList<LagBin> bins, VariogramModel model)Fits the model to experimental lags by weighted least squares with Cressie's (1985) weights, pairs / (model semivariance)^2, which favour the short lags that matter most to kriging. For a given range the nugget and the partial sill are the solution of a linear weighted least-squares problem (constrained to be non-negative), so only the range is searched - over a logarithmic grid and then by golden section - and there is no optimiser to get stuck. Lags of exact theoretical semivariances therefore return exactly the model that made them.
static Variogram Fit(IReadOnlyList<ScatterPoint> points, VariogramModel model, int lagCount, double? maxLag = null)The model fitted to the points' experimental variogram: see VariogramModel).
double Value(double h)The semivariance at separation h (zero at zero).

VariogramModel enum

The shape of a variogram: how the semivariance rises with distance.

MemberSummary
SphericalRises as 1.5 h/a - 0.5 (h/a)^3 and reaches the sill exactly at the range a - the usual choice for a surface that is rough at short distances (Matheron 1963).
ExponentialRises as 1 - exp(-3 h/a): the sill is approached, never reached, and a is the practical range (95 % of the sill).
GaussianRises as 1 - exp(-3 (h/a)^2): very smooth at short distances (a is the practical range, 95 % of the sill); it can make the kriging system poorly conditioned without a nugget.

WellMapRow class

One well's part of a map: where it is, what it contributes, or why it was left out.

MemberSummary
bool Included { get; set; }Whether the well contributes a point to the map.
double? Md { get; set; }Measured depth of the pick (environment depth unit), where there is one.
List<string> Notes { get; }What the reader should know about this well's point (an uncorrected azimuth, several picks of one name ...).
string Reason { get; set; }Why a well is left out.
double? Tvd { get; set; }True vertical depth of the pick, below the depth datum.
double? Tvdss { get; set; }True vertical depth of the pick below sea level, where the datum's elevation is known.
double? Value { get; set; }The mapped value, in ValueUnit.
string Well { get; set; }Well name.
double X { get; set; }Easting of the point (m, in the map's coordinate system).
double Y { get; set; }Northing of the point (m).

WellMaps static class

Maps made from well data: a formation top, the thickness between two tops, net pay, or any value per well. A pick is placed where the well really is - the wellhead plus the trajectory's offsets at the pick's measured depth, with the survey's azimuths brought to grid north - not at the wellhead. A well that cannot be placed or read is left out of the map with its reason in the table, never guessed at (mapping.assumeVerticalWhenNoSurvey and assumeWgs84WhenCrsUnknown are the explicit exceptions).

MemberSummary
static WellMapSet NetPay(IEnumerable<WellModel> wells, string zone)Net pay in true vertical thickness (the pay summary's NetPayTvd of the named zone), placed at the middle of the zone.
static WellMapSet Structure(IEnumerable<WellModel> wells, string topName)A formation top: depth at each well's pick, per mapping.structureDepth (tvdss by default), placed at the pick.
static WellMapSet Thickness(IEnumerable<WellModel> wells, string upperTop, string lowerTop)The vertical thickness between two tops (true vertical depth of the lower minus the upper - an isochore), placed midway between the two picks.
static WellMapSet Values(IEnumerable<WellModel> wells, Func<WellModel, double?> value, string unit, string description)Any value per well (an average porosity, an initial pressure, a cumulative production), placed at the wellhead.

WellMapSet class

The points of a map made from well data, with the table that says where each came from and which wells were left out and why.

MemberSummary
string Description { get; set; }What is mapped.
CoordinateSystem MapSystem { get; set; }The coordinate system the map is in.
List<string> Notes { get; }Notes about the map as a whole.
List<WellMapRow> Rows { get; }Every well, in the order given.
string ValueUnit { get; set; }The unit of the values (the environment's depth unit unless the values are something else).
List<MapWell> MapWells()The included wells as map points, for ContourMapView.
List<ScatterPoint> Points()The included wells as scattered points, ready for Gridding.
string ToCsv()The table as CSV: invariant numbers, depths in the environment's depth unit, columns named with their unit.