Expand description
From an EnergyML representation to points a program can draw.
The storage layer answers “what is in this package” and “give me that array”. This one answers the question an application actually has: where is this surface, and what shape is it?
§The thing nobody expects
An EnergyML array is not a file offset. AbstractPoint3dArray has half a
dozen concrete forms and only one of them is “read it from HDF5”:
| Form | Where the numbers are |
|---|---|
Point3dExternalArray / Point3dHdf5Array | in the external file |
Point3dLatticeArray | nowhere - an origin, direction vectors and spacings, from which the points are computed |
Point3dZValueArray | x and y from a supporting geometry (usually a lattice), z from an array |
Point3dParametricArray | on parametric lines, evaluated from control points |
Point3dFromRepresentationLatticeArray | in another representation |
On the reference corpus that is 71 external arrays against 19 that are not,
so a reader that only knows HDF5 silently loses every 2D grid and every
wellbore trajectory - and loses them as empty geometry, which looks like
a working program showing nothing. The same is true of plain numeric arrays:
DoubleConstantArray and DoubleLatticeArray carry no data either.
So values and points resolve every form, and the ones that are
not implemented yet fail by name instead of returning nothing.
§Two places a reader quietly gets it wrong
Both were found by running this crate over the reference corpus, and both produce a plausible-looking result rather than an error:
- Patch node numbering. A triangle’s indices may be numbered inside its
own patch or across the whole representation - FESAPI writes one, resqpy
the other.
geometrydecides from the numbers and refuses what fits neither, andPatch::node_offsetrecords the patch’s place. - Lattice axis order. Dimensions are listed slowest first, so the last one varies fastest. Reversing it keeps the point count exactly right and transposes the surface.
§Where it sits
Above the storage layer, never inside it (ADR-0002). Everything here takes objects already in memory plus a ValueSource
for the arrays, so an ETP dataspace works exactly as a file does.
Re-exports§
pub use error::Error;pub use error::Result;pub use geometry::Geometry;pub use geometry::Patch;pub use geometry::Polyhedra;pub use geometry::Topology;pub use points::Point;pub use readers::Readers;pub use readers::RepresentationReader;pub use scene::Attribute;pub use scene::AttributeScope;pub use scene::Placement;pub use scene::Related;pub use scene::SceneObject;
Modules§
- clip
- Cutting a surface with a ring seen from above - removing parts: the user draws a ring (outer or inner), and what falls inside - or outside - becomes a new representation. Never a modification of the original: it stays what the producer wrote, and the provenance says which came from which.
- connection
GridConnectionSetRepresentation- the connections a grid states between its cells, and what can honestly be drawn for them.- crs
- Units and coordinate reference systems, shared with every other consumer.
- defined
- Nodes that have no position, and what a drawing may do with them.
- derived
- Points borrowed from another representation.
- error
- What can go wrong between an object and a set of points.
- fence
- The filled cross-section - the panels between two surfaces along a trace.
- follow
- Following a reference: by its full uri, never by its uuid alone.
- geometry
- A representation, turned into patches of points and how they connect.
- heads
- The wellheads of many wells, in the coordinates a scene draws them in - what a profile projects (the wiring that was still to be done for the well profile view).
- ijk
- IJK grids: pillars, split coordinate lines, and cells.
- min_
curvature - The minimum curvature method - the arc tangent to two directions that joins two stations of a well path - and, run forward, where a surveyed hole runs: positions from the stations a directional survey measured, a measured depth, an inclination and an azimuth each, out north, east and vertical depth from the first station.
- parametric
- Points that live on lines: parametric geometry.
- parent
- Representations whose geometry belongs to another object.
- plane
PlaneSetRepresentation- a set of planes, and the one that has no extent.- points
- Any
AbstractPoint3dArray, resolved to coordinates. - readers
- Which representations this build can turn into points, and how to add more.
- reproject
- Units and coordinate reference systems, shared with every other consumer.
- scene
- What an exporter is given: shape, place, and identity.
- section
- The vertical section along a trace - the geologist’s profile.
- shape
- Asking a representation for a form rather than taking the one it has.
- source
- Where the arrays and the referenced objects come from.
- stations
- A WITSML
Trajectory, drawn: its stations placed by the minimum curvature method from the datum its measured depths are counted from. - transfer
- Moving a property’s values between the points and the cells of a shape.
- tube
- Sweeping a circle along a polyline: a well drawn as a solid rather than a hair.
- units
- Units and coordinate reference systems, shared with every other consumer.
- unstructured
- Unstructured grids: cells made of faces, faces made of nodes.
- values
- Numeric arrays, as geometry wants them.
- well
- Wells whose only spatial anchor is a reference point.
- wells
- The wellbores of a package in one CSV: everything the package says about them.
Structs§
- Crs
- A coordinate reference system, read the same way in every version.
Enums§
- CrsKind
- Which system a projected or vertical component names.
- Vertical
Direction - Which way the vertical axis counts.
- Vertical
Quantity - What the third coordinate measures.
Traits§
- Value
Source - Reading the arrays an object points at.