navibyte / geospatial

Geospatial data structures, tools and utilities for Dart and Flutter.
Other
51 stars 5 forks source link

Enum for dimensionality or topological dimension #220

Closed navispatial closed 8 months ago

navispatial commented 8 months ago

The new enum specified as:

/// An enum for *dimensionality* or *topological dimension* in the context of
/// geospatial applications.
enum Dimensionality {
  /// A dimensionality representing a *punctual* geometry (or position, point,
  /// vertex, node, marker etc.) with the topological dimension of `0`.
  punctual(0),

  /// A dimensionality representing a *linear* geometry (or chain, line string,
  /// polyline, path, curve etc.) with the topological dimension of `1`.
  linear(1),

  /// A dimensionality representing an *areal* geometry (or polygon, area,
  /// surface, box etc.) with the topological dimension of `2`.
  areal(2),

  /// A dimensionality representing a *volymetric* geometry (or tetrahedron,
  /// polyhedron, volyme, cube etc.) with the topological dimension of `3`.
  volymetric(3);

  const Dimensionality(this.topologicalDimension);

  /// The topological dimension (`0`: punctual, `1`: linear, `2`: areal,
  /// `3`: volymetric).
  final int topologicalDimension;
}
navispatial commented 8 months ago

Implemented in geobase 1.0.0.