pub enum Shape {
Auto,
Points,
Lines,
Surface,
Volume,
Outline,
Centroid,
}Expand description
The form a caller wants a representation drawn in.
Variants§
Auto
The richest form this topology supports.
A grid becomes its cells, a polyline set stays lines, a hexahedral grid stays a volume. What every export did before there was anything to ask.
Points
The nodes alone.
Lines
Polylines.
Surface
Triangles and quadrilaterals.
Volume
Cells with an inside.
Outline
One polygon: the convex hull of every node, whatever the topology was.
A summary, not a rendering - the first of the two shapes here whose
output is not the object. It answers “where is this”, which is what a
discovery index wants and what OSDU’s SpatialArea asks for: “a polygon
boundary that reflects the locale of the content”. (OSDU).
Convex and not concave, deliberately: an alpha-shape follows a horizon’s bays and holes far better, and it needs a parameter whose wrong value silently cuts the outline into pieces. A hull has no parameter and no wrong answer - it is simply the smallest convex thing containing the data.
Centroid
One point: the mean of the nodes.
The other summary, and OSDU’s SpatialPoint: “a centroid point that
reflects the locale of the content”.
The mean of the nodes, which is not the centroid of the area - a densely sampled corner pulls it. Saying so rather than implying a precision this does not have; for “where is this on a map”, at the scale these are used, the difference is invisible.
Implementations§
Source§impl Shape
impl Shape
Sourcepub fn is_summary(&self) -> bool
pub fn is_summary(&self) -> bool
Whether this shape summarises the object instead of drawing it.
The two are different in a way a caller has to know about: a summary replaces the points, so nothing that hangs on nodes or cells - a property, a colour ramp - comes through it. Four points that say where a horizon is cannot carry a value per node of the horizon.
Trait Implementations§
impl Copy for Shape
impl Eq for Shape
impl StructuralPartialEq for Shape
Auto Trait Implementations§
impl Freeze for Shape
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnsafeUnpin for Shape
impl UnwindSafe for Shape
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.