Loading...
Searching...
No Matches
hydrocouplespatial.h
Go to the documentation of this file.
1
20
21#ifndef HYDROCOUPLESPATIAL_H
22#define HYDROCOUPLESPATIAL_H
23
24#include "hydrocouple.h"
25
26
36#if defined(__GNUC__) || defined(__clang__)
37#pragma GCC visibility push(default)
38#endif
39
40namespace HydroCouple
41{
45 namespace Spatial
46 {
47 class IEdge;
48 class IMeshView;
49 class IRasterBand;
50 class IPolygon;
52
62 enum class MeshLocation : uint8_t
63 {
64 Node = 0,
68 };
69
88
105
118
124 {
125
126 public:
130 virtual ~ISpatialReferenceSystem() = default;
131
137 [[nodiscard]] virtual int authSRID() const = 0;
138
142 [[nodiscard]] virtual const std::string &authName() const = 0;
143
147 [[nodiscard]] virtual const std::string &srText() const = 0;
148
152 [[nodiscard]] virtual HydroCouple::IUnit::DistanceUnits distanceUnits() const = 0;
153
166 [[nodiscard]] virtual const std::string &verticalAuthName() const = 0;
167
171 [[nodiscard]] virtual int verticalAuthSRID() const = 0;
172
176 [[nodiscard]] virtual const std::string &verticalSrText() const = 0;
177
184 };
185
190 {
191 public:
195 virtual ~IEnvelope() = default;
196
201 [[nodiscard]] virtual double minX() const = 0;
202
207 [[nodiscard]] virtual double maxX() const = 0;
208
213 [[nodiscard]] virtual double minY() const = 0;
214
219 [[nodiscard]] virtual double maxY() const = 0;
220
225 [[nodiscard]] virtual double minZ() const = 0;
226
231 [[nodiscard]] virtual double maxZ() const = 0;
232 };
233
238 {
239 public:
243 enum class GeometryType
244 {
246 Point = 1,
259 Curve = 13,
262 TIN = 16,
263
264 GeometryZ = 1000,
265 PointZ = 1001,
267 PolygonZ = 1003,
268 TriangleZ = 1017,
278 CurveZ = 1013,
279 SurfaceZ = 1014,
281 TINZ = 1016,
282
283 GeometryM = 2000,
284 PointM = 2001,
286 PolygonM = 2003,
287 TriangleM = 2017,
297 CurveM = 2013,
298 SurfaceM = 2014,
300 TINM = 2016,
301
303 PointZM = 3001,
305 PolygonZM = 3003,
316 CurveZM = 3013,
317 SurfaceZM = 3014,
319 TINZM = 3016,
320 };
321
325 virtual ~IGeometry() = default;
326
331 [[nodiscard]] virtual const std::string &id() const = 0;
332
337 [[nodiscard]] virtual int64_t index() const = 0;
338
346 [[nodiscard]] virtual int dimension() const = 0;
347
353 [[nodiscard]] virtual int coordinateDimension() const = 0;
354
361 [[nodiscard]] virtual GeometryType geometryType() const = 0;
362
366 [[nodiscard]] virtual ISpatialReferenceSystem *spatialReferenceSystem() const = 0;
367
373 [[nodiscard]] virtual IEnvelope *envelope() const = 0;
374
379 [[nodiscard]] virtual std::string getWKT() const = 0;
380
384 [[nodiscard]] virtual std::vector<unsigned char> getWKB() const = 0;
385
390 [[nodiscard]] virtual bool isEmpty() const = 0;
391
399 [[nodiscard]] virtual bool isSimple() const = 0;
400
404 [[nodiscard]] virtual bool is3D() const = 0;
405
409 [[nodiscard]] virtual bool isMeasured() const = 0;
410
420 [[nodiscard]] virtual std::unique_ptr<IGeometry> boundary() const = 0;
421
426
430 [[nodiscard]] virtual bool equals(const IGeometry &geom) const = 0;
431
435 [[nodiscard]] virtual bool disjoint(const IGeometry &geom) const = 0;
436
440 [[nodiscard]] virtual bool intersects(const IGeometry &geom) const = 0;
441
445 [[nodiscard]] virtual bool touches(const IGeometry &geom) const = 0;
446
450 [[nodiscard]] virtual bool crosses(const IGeometry &geom) const = 0;
451
455 [[nodiscard]] virtual bool within(const IGeometry &geom) const = 0;
456
460 [[nodiscard]] virtual bool contains(const IGeometry &geom) const = 0;
461
465 [[nodiscard]] virtual bool overlaps(const IGeometry &geom) const = 0;
466
476 [[nodiscard]] virtual bool relate(const IGeometry &geom, const std::string &intersectionPatternMatrix) const = 0;
477
481 [[nodiscard]] virtual std::unique_ptr<IGeometry> locateAlong(double value) const = 0;
482
486 [[nodiscard]] virtual std::unique_ptr<IGeometry> locateBetween(double mStart, double mEnd) const = 0;
487
489
497
506 [[nodiscard]] virtual double distance(const IGeometry &geom) const = 0;
507
515 [[nodiscard]] virtual std::unique_ptr<IGeometry> buffer(double bufferDistance) const = 0;
516
523 [[nodiscard]] virtual std::unique_ptr<IGeometry> convexHull() const = 0;
524
528 [[nodiscard]] virtual std::unique_ptr<IGeometry> intersection(const IGeometry &geom) const = 0;
529
533 [[nodiscard]] virtual std::unique_ptr<IGeometry> unionG(const IGeometry &geom) const = 0;
534
538 [[nodiscard]] virtual std::unique_ptr<IGeometry> difference(const IGeometry &geom) const = 0;
539
543 [[nodiscard]] virtual std::unique_ptr<IGeometry> symmetricDifference(const IGeometry &geom) const = 0;
544
546 };
547
561 class IGeometryCollection : public virtual IGeometry
562 {
563
564 public:
568 virtual ~IGeometryCollection() = default;
569
574 [[nodiscard]] virtual int64_t geometryCount() const = 0;
575
581 [[nodiscard]] virtual IGeometry *geometry(int64_t index) const = 0;
582 };
583
594 class IPoint : public virtual IGeometry
595 {
596 public:
600 virtual ~IPoint() = default;
601
605 [[nodiscard]] virtual double x() const = 0;
606
610 [[nodiscard]] virtual double y() const = 0;
611
615 [[nodiscard]] virtual double z() const = 0;
616
620 [[nodiscard]] virtual double m() const = 0;
621 };
622
636 class IMultiPoint : public virtual IGeometryCollection
637 {
638
639 public:
643 virtual ~IMultiPoint() = default;
644
648 [[nodiscard]] virtual IPoint *point(int64_t index) const = 0;
649 };
650
654 class IVertex : public virtual IPoint
655 {
656 public:
660 virtual ~IVertex() = default;
661
667 [[nodiscard]] virtual IEdge *edge() const = 0;
668 };
669
693 class ICurve : public virtual IGeometry
694 {
695
696 public:
700 virtual ~ICurve() = default;
701
705 [[nodiscard]] virtual double length() const = 0;
706
710 [[nodiscard]] virtual IPoint *startPoint() const = 0;
711
715 [[nodiscard]] virtual IPoint *endPoint() const = 0;
716
720 [[nodiscard]] virtual bool isClosed() const = 0;
721
726 [[nodiscard]] virtual bool isRing() const = 0;
727 };
728
750 class IMultiCurve : public virtual IGeometryCollection
751 {
752 public:
753 virtual ~IMultiCurve() = default;
754
759 [[nodiscard]] virtual bool isClosed() const = 0;
760
765 [[nodiscard]] virtual double length() const = 0;
766 };
767
772 class ILineString : public virtual ICurve
773 {
774 public:
778 virtual ~ILineString() = default;
779
783 [[nodiscard]] virtual int64_t pointCount() const = 0;
784
788 [[nodiscard]] virtual IPoint *point(int64_t index) const = 0;
789 };
790
794 class IMultiLineString : public virtual IMultiCurve
795 {
796 public:
800 virtual ~IMultiLineString() = default;
801
803 [[nodiscard]] virtual ILineString *lineString(int64_t index) const = 0;
804 };
805
809 class ILine : public virtual ILineString
810 {
811 public:
815 virtual ~ILine() = default;
816 };
817
821 class ILinearRing : public virtual ILineString
822 {
823 public:
827 virtual ~ILinearRing() = default;
828 };
829
836 class IEdge
837 {
838 public:
842 virtual ~IEdge() = default;
843
847 [[nodiscard]] virtual int64_t index() const = 0;
848
853 [[nodiscard]] virtual IVertex *orig() const = 0;
854
859 [[nodiscard]] virtual IVertex *dest() const = 0;
860
866 [[nodiscard]] virtual IPolygon *left() const = 0;
867
873 [[nodiscard]] virtual IPolygon *right() const = 0;
874
879 [[nodiscard]] virtual IPolygon *face() const = 0;
880
886 [[nodiscard]] virtual IEdge *rot() const = 0;
887
893 [[nodiscard]] virtual IEdge *invRot() const = 0;
894
900 [[nodiscard]] virtual IEdge *sym() const = 0;
901
907 [[nodiscard]] virtual IEdge *origNext() const = 0;
908
914 [[nodiscard]] virtual IEdge *origPrev() const = 0;
915
921 [[nodiscard]] virtual IEdge *destNext() const = 0;
922
928 [[nodiscard]] virtual IEdge *destPrev() const = 0;
929
935 [[nodiscard]] virtual IEdge *leftNext() const = 0;
936
942 [[nodiscard]] virtual IEdge *leftPrev() const = 0;
943
949 [[nodiscard]] virtual IEdge *rightNext() const = 0;
950
956 [[nodiscard]] virtual IEdge *rightPrev() const = 0;
957 };
958
981 class ISurface : public virtual IGeometry
982 {
983 public:
987 virtual ~ISurface() = default;
988
993 [[nodiscard]] virtual double area() const = 0;
994
999 [[nodiscard]] virtual std::unique_ptr<IPoint> centroid() const = 0;
1000
1004 [[nodiscard]] virtual std::unique_ptr<IPoint> pointOnSurface() const = 0;
1005
1010 [[nodiscard]] virtual std::unique_ptr<IMultiCurve> boundaryMultiCurve() const = 0;
1011 };
1012
1017 class IMultiSurface : public virtual IGeometryCollection
1018 {
1019
1020 public:
1024 virtual ~IMultiSurface() = default;
1025
1030 [[nodiscard]] virtual double area() const = 0;
1031
1036 [[nodiscard]] virtual std::unique_ptr<IPoint> centroid() const = 0;
1037
1041 [[nodiscard]] virtual std::unique_ptr<IPoint> pointOnSurface() const = 0;
1042 };
1043
1081 class IPolygon : public virtual ISurface
1082 {
1083 public:
1087 virtual ~IPolygon() = default;
1088
1092 [[nodiscard]] virtual ILineString *exteriorRing() const = 0;
1093
1097 [[nodiscard]] virtual int64_t interiorRingCount() const = 0;
1098
1102 [[nodiscard]] virtual ILineString *interiorRing(int64_t index) const = 0;
1103
1109 [[nodiscard]] virtual IEdge *edge() const = 0;
1110
1115 [[nodiscard]] virtual IPolyhedralSurface *polyhedralSurface() const = 0;
1116 };
1117
1121 class IMultiPolygon : public virtual IMultiSurface
1122 {
1123
1124 public:
1125 virtual ~IMultiPolygon() = default;
1126
1130 [[nodiscard]] virtual IPolygon *polygon(int64_t index) const = 0;
1131 };
1132
1137 class ITriangle : public virtual IPolygon
1138 {
1139 public:
1143 virtual ~ITriangle() = default;
1144
1148 [[nodiscard]] virtual IVertex *vertex1() const = 0;
1149
1153 [[nodiscard]] virtual IVertex *vertex2() const = 0;
1154
1158 [[nodiscard]] virtual IVertex *vertex3() const = 0;
1159
1163 [[nodiscard]] virtual IVertex *vertex(int64_t index) const = 0;
1164 };
1165
1169 class INetwork : public virtual IIdentity
1170 {
1171 public:
1175 virtual ~INetwork() = default;
1176
1180 [[nodiscard]] virtual int64_t edgeCount() const = 0;
1181
1186 [[nodiscard]] virtual IEdge *edge(int64_t index) const = 0;
1187
1191 [[nodiscard]] virtual int64_t vertexCount() const = 0;
1192
1197 [[nodiscard]] virtual IVertex *vertex(int64_t index) const = 0;
1198
1206 [[nodiscard]] virtual const IMeshView *meshView() const = 0;
1207 };
1208
1215 class IPolyhedralSurface : public virtual ISurface
1216 {
1217 public:
1221 virtual ~IPolyhedralSurface() = default;
1222
1226 [[nodiscard]] virtual int64_t patchCount() const = 0;
1227
1232 [[nodiscard]] virtual IPolygon *patch(int64_t index) const = 0;
1233
1237 [[nodiscard]] virtual int64_t vertexCount() const = 0;
1238
1243 [[nodiscard]] virtual IVertex *vertex(int64_t index) const = 0;
1244
1252 [[nodiscard]] virtual std::unique_ptr<IMultiPolygon> boundingPolygons(const IPolygon *polygon) const = 0;
1253
1257 [[nodiscard]] virtual bool isClosed() const = 0;
1258
1266 [[nodiscard]] virtual const IMeshView *meshView() const = 0;
1267 };
1268
1273 class ITIN : public virtual IPolyhedralSurface
1274 {
1275 public:
1279 virtual ~ITIN() = default;
1280
1285 [[nodiscard]] virtual ITriangle *triangle(int64_t index) const = 0;
1286 };
1287
1291 class IRaster : public virtual IIdentity
1292 {
1293
1294 public:
1335
1339 virtual ~IRaster() = default;
1340
1344 [[nodiscard]] virtual int64_t xSize() const = 0;
1345
1349 [[nodiscard]] virtual int64_t ySize() const = 0;
1350
1354 [[nodiscard]] virtual int64_t rasterBandCount() const = 0;
1355
1359 virtual void addRasterBand(RasterDataType dataType) = 0;
1360
1364 [[nodiscard]] virtual ISpatialReferenceSystem *spatialReferenceSystem() const = 0;
1365
1374 virtual void geoTransformation(double *transformationMatrix) const = 0;
1375
1379 [[nodiscard]] virtual IRasterBand *getRasterBand(int64_t bandIndex) const = 0;
1380 };
1381
1385 class IRasterBand : public virtual IIdentity
1386 {
1387
1388 public:
1392 virtual ~IRasterBand() = default;
1393
1395 [[nodiscard]] virtual int64_t xSize() const = 0;
1396
1398 [[nodiscard]] virtual int64_t ySize() const = 0;
1399
1401 [[nodiscard]] virtual IRaster *raster() const = 0;
1402
1404 [[nodiscard]] virtual IRaster::RasterDataType dataType() const = 0;
1405
1420 [[nodiscard]] virtual bool read(int64_t xOffset, int64_t yOffset, int64_t xSize, int64_t ySize,
1421 const BufferDescriptor &destination, std::string *message = nullptr) const = 0;
1422
1434 [[nodiscard]] virtual bool write(int64_t xOffset, int64_t yOffset, int64_t xSize, int64_t ySize,
1435 const BufferDescriptor &source, std::string *message = nullptr) = 0;
1436
1440 [[nodiscard]] virtual double noData() const = 0;
1441 };
1442
1447 class IRegularGrid2D : public virtual IIdentity
1448 {
1449 public:
1453 virtual ~IRegularGrid2D() = default;
1454
1458 [[nodiscard]] virtual ISpatialReferenceSystem *spatialReferenceSystem() const = 0;
1459
1464 [[nodiscard]] virtual RegularGridType gridType() const = 0;
1465
1470 [[nodiscard]] virtual int64_t numXNodes() const = 0;
1471
1476 [[nodiscard]] virtual int64_t numYNodes() const = 0;
1477
1485 [[nodiscard]] virtual double xNodeLocation(int64_t xNodeIndex, int64_t yNodeIndex) const = 0;
1486
1494 [[nodiscard]] virtual double yNodeLocation(int64_t xNodeIndex, int64_t yNodeIndex) const = 0;
1495
1501 [[nodiscard]] virtual std::span<const double> nodeXs() const = 0;
1502
1508 [[nodiscard]] virtual std::span<const double> nodeYs() const = 0;
1509
1517 [[nodiscard]] virtual bool isActive(int64_t xCellIndex, int64_t yCellIndex) const = 0;
1518
1524 [[nodiscard]] virtual std::span<const uint8_t> activeCells() const = 0;
1525 };
1526
1536 class IRegularGrid3D : public virtual IIdentity
1537 {
1538 public:
1542 virtual ~IRegularGrid3D() = default;
1543
1547 [[nodiscard]] virtual ISpatialReferenceSystem *spatialReferenceSystem() const = 0;
1548
1553 [[nodiscard]] virtual RegularGridType gridType() const = 0;
1554
1559 [[nodiscard]] virtual int64_t numXNodes() const = 0;
1560
1565 [[nodiscard]] virtual int64_t numYNodes() const = 0;
1566
1571 [[nodiscard]] virtual int64_t numZNodes() const = 0;
1572
1580 [[nodiscard]] virtual double xNodeLocation(int64_t xNodeIndex, int64_t yNodeIndex) const = 0;
1581
1589 [[nodiscard]] virtual double yNodeLocation(int64_t xNodeIndex, int64_t yNodeIndex) const = 0;
1590
1599 [[nodiscard]] virtual double zNodeLocation(int64_t xNodeIndex, int64_t yNodeIndex, int64_t zNodeIndex) const = 0;
1600
1606 [[nodiscard]] virtual std::span<const double> nodeXs() const = 0;
1607
1613 [[nodiscard]] virtual std::span<const double> nodeYs() const = 0;
1614
1620 [[nodiscard]] virtual std::span<const double> nodeZs() const = 0;
1621
1630 [[nodiscard]] virtual bool isActive(int64_t xCellIndex, int64_t yCellIndex, int64_t zCellIndex) const = 0;
1631
1637 [[nodiscard]] virtual std::span<const uint8_t> activeCells() const = 0;
1638 };
1639
1657 {
1658 public:
1662 virtual ~IMeshView() = default;
1663
1667 [[nodiscard]] virtual int64_t nodeCount() const = 0;
1668
1672 [[nodiscard]] virtual int64_t edgeCount() const = 0;
1673
1677 [[nodiscard]] virtual int64_t faceCount() const = 0;
1678
1682 [[nodiscard]] virtual std::span<const double> nodeX() const = 0;
1683
1687 [[nodiscard]] virtual std::span<const double> nodeY() const = 0;
1688
1692 [[nodiscard]] virtual std::span<const double> nodeZ() const = 0;
1693
1699 [[nodiscard]] virtual std::span<const int64_t> faceNodeOffsets() const = 0;
1700
1704 [[nodiscard]] virtual std::span<const int64_t> faceNodes() const = 0;
1705
1712 [[nodiscard]] virtual std::span<const int64_t> edgeNodes() const = 0;
1713
1718
1726 [[nodiscard]] virtual std::span<const int64_t> faceEdgeOffsets() const = 0;
1727
1731 [[nodiscard]] virtual std::span<const int64_t> faceEdges() const = 0;
1732
1742 [[nodiscard]] virtual std::span<const int64_t> edgeFaces() const = 0;
1743
1745
1755
1759 [[nodiscard]] virtual std::span<const double> faceX() const = 0;
1760
1764 [[nodiscard]] virtual std::span<const double> faceY() const = 0;
1765
1769 [[nodiscard]] virtual std::span<const double> faceAreas() const = 0;
1770
1774 [[nodiscard]] virtual std::span<const double> edgeLengths() const = 0;
1775
1780 [[nodiscard]] virtual std::span<const double> edgeNormalX() const = 0;
1781
1785 [[nodiscard]] virtual std::span<const double> edgeNormalY() const = 0;
1786
1788 };
1789
1798 {
1799 public:
1803 virtual ~IGeometryComponentDataItem() = default;
1804
1808 [[nodiscard]] virtual IGeometry::GeometryType geometryType() const = 0;
1809
1813 [[nodiscard]] virtual int64_t geometryCount() const = 0;
1814
1819 [[nodiscard]] virtual IGeometry *geometry(int64_t geometryIndex) const = 0;
1820
1824 [[nodiscard]] virtual HydroCouple::IDimension *geometryDimension() const = 0;
1825
1829 [[nodiscard]] virtual HydroCouple::Spatial::IEnvelope *envelope() const = 0;
1830 };
1831
1842 {
1843 public:
1847 virtual ~INetworkComponentDataItem() = default;
1848
1852 [[nodiscard]] virtual INetwork *network() const = 0;
1853
1857 [[nodiscard]] virtual MeshLocation location() const = 0;
1858
1862 [[nodiscard]] virtual SpatialDataType networkDataType() const = 0;
1863
1867 [[nodiscard]] virtual VectorBasis vectorBasis() const = 0;
1868
1872 [[nodiscard]] virtual IDimension *entityDimension() const = 0;
1873 };
1874
1885 {
1886 public:
1891
1895 [[nodiscard]] virtual MeshLocation location() const = 0;
1896
1900 [[nodiscard]] virtual SpatialDataType meshDataType() const = 0;
1901
1905 [[nodiscard]] virtual VectorBasis vectorBasis() const = 0;
1906
1910 [[nodiscard]] virtual IPolyhedralSurface *polyhedralSurface() const = 0;
1911
1915 [[nodiscard]] virtual IDimension *entityDimension() const = 0;
1916 };
1917
1923 {
1924 public:
1928 virtual ~ITINComponentDataItem() = default;
1929
1933 [[nodiscard]] virtual ITIN *TIN() const = 0;
1934 };
1935
1945 {
1946 public:
1950 virtual ~IRasterComponentDataItem() = default;
1951
1955 [[nodiscard]] virtual IRaster *raster() const = 0;
1956
1960 [[nodiscard]] virtual IDimension *xDimension() const = 0;
1961
1965 [[nodiscard]] virtual IDimension *yDimension() const = 0;
1966
1970 [[nodiscard]] virtual IDimension *bandDimension() const = 0;
1971 };
1972
1983 {
1984 public:
1989
1993 [[nodiscard]] virtual IRegularGrid2D *grid() const = 0;
1994
1999 [[nodiscard]] virtual MeshLocation location() const = 0;
2000
2004 [[nodiscard]] virtual IDimension *xCellDimension() const = 0;
2005
2009 [[nodiscard]] virtual IDimension *yCellDimension() const = 0;
2010
2014 [[nodiscard]] virtual IDimension *cellEdgeDimension() const = 0;
2015
2019 [[nodiscard]] virtual IDimension *cellVertexDimension() const = 0;
2020 };
2021
2031 {
2032 public:
2037
2041 [[nodiscard]] virtual IRegularGrid3D *grid() const = 0;
2042
2047 [[nodiscard]] virtual MeshLocation location() const = 0;
2048
2052 [[nodiscard]] virtual IDimension *xCellDimension() const = 0;
2053
2057 [[nodiscard]] virtual IDimension *yCellDimension() const = 0;
2058
2062 [[nodiscard]] virtual IDimension *zCellDimension() const = 0;
2063
2067 [[nodiscard]] virtual IDimension *cellFaceDimension() const = 0;
2068
2072 [[nodiscard]] virtual IDimension *cellVertexDimension() const = 0;
2073 };
2074
2093
2122 {
2123 public:
2124 virtual ~IVerticalCoordinate() = default;
2125
2129 [[nodiscard]] virtual VerticalCoordinateKind kind() const = 0;
2130
2134 [[nodiscard]] virtual int64_t layerCount() const = 0;
2135
2141 [[nodiscard]] virtual int64_t columnCount() const = 0;
2142
2150 [[nodiscard]] virtual bool isTimeVarying() const = 0;
2151
2160 [[nodiscard]] virtual uint64_t geometryEpoch() const = 0;
2161
2172 [[nodiscard]] virtual double interfaceElevation(int64_t cellIndex,
2173 int64_t interfaceIndex) const = 0;
2174
2185 [[nodiscard]] virtual std::span<const double> interfaceElevations() const = 0;
2186 };
2187
2197 {
2198 public:
2199 virtual ~ILayering() = default;
2200
2208 [[nodiscard]] virtual IDimension *layerDimension() const = 0;
2209
2216 [[nodiscard]] virtual IVerticalCoordinate *verticalCoordinate() const = 0;
2217 };
2218
2237 : public virtual IPolyhedralSurfaceComponentDataItem,
2238 public virtual ILayering
2239 {
2240 public:
2242 };
2243
2254
2299 {
2300 public:
2301 virtual ~ICrossSection() = default;
2302
2306 [[nodiscard]] virtual CrossSectionKind kind() const = 0;
2307
2311 [[nodiscard]] virtual double invertElevation() const = 0;
2312
2316 [[nodiscard]] virtual double topWidth(double stage) const = 0;
2317
2321 [[nodiscard]] virtual double storageArea(double stage) const = 0;
2322
2329 [[nodiscard]] virtual double flowArea(double stage) const = 0;
2330
2337 [[nodiscard]] virtual double wettedPerimeter(double stage) const = 0;
2338
2353 virtual void evaluate(std::span<const double> stages,
2354 std::span<double> topWidths,
2355 std::span<double> storageAreas,
2356 std::span<double> flowAreas,
2357 std::span<double> wettedPerimeters) const = 0;
2358
2362 [[nodiscard]] virtual int64_t stationCount() const = 0;
2363
2374 virtual void stations(double *stations, double *elevations) const = 0;
2375 };
2376
2399 : public virtual INetworkComponentDataItem,
2400 public virtual ILayering
2401 {
2402 public:
2404
2415 [[nodiscard]] virtual ICrossSection *crossSection(int64_t entityIndex) const = 0;
2416 };
2417 }
2418}
2419
2420#if defined(__GNUC__) || defined(__clang__)
2421#pragma GCC visibility pop
2422#endif
2423
2424#endif // HYDROCOUPLESPATIAL_H
IComponentDataItem is a fundamental unit of data for a component.
Definition hydrocouple.h:1844
IDimension provides the properties of one axis of a data item's index space.
Definition hydrocouple.h:1494
IIdentity interface class defines a method to get the Id of an HydroCouple entity.
Definition hydrocouple.h:476
DistanceUnits
HydroCouple::DistanceUnits are the types of units that can be used to measure distance.
Definition hydrocouple.h:1696
The shape of a channel at one place, as a function of stage.
Definition hydrocouplespatial.h:2299
virtual double flowArea(double stage) const =0
The conveying part of that area at stage.
virtual double storageArea(double stage) const =0
Total wetted area at stage — everything holding water.
virtual double topWidth(double stage) const =0
Width of the water surface at stage.
virtual CrossSectionKind kind() const =0
How the producer holds this shape.
virtual double invertElevation() const =0
Lowest elevation in the section (positive up).
virtual void evaluate(std::span< const double > stages, std::span< double > topWidths, std::span< double > storageAreas, std::span< double > flowAreas, std::span< double > wettedPerimeters) const =0
Evaluates the section at many stages in one call.
virtual int64_t stationCount() const =0
Number of survey points, or 0 when the producer holds no points.
virtual void stations(double *stations, double *elevations) const =0
The survey points, ordered left bank to right bank.
virtual double wettedPerimeter(double stage) const =0
Wetted perimeter of the conveying area at stage.
A Curve is a 1-dimensional geometric object usually stored as a sequence of IPoints,...
Definition hydrocouplespatial.h:694
virtual IPoint * endPoint() const =0
The end IPoint of this ICurve.
virtual IPoint * startPoint() const =0
The start IPoint of this ICurve.
virtual bool isClosed() const =0
virtual double length() const =0
The length of this ICurve in its associated ISpatialReferenceSystem.
virtual bool isRing() const =0
virtual ~ICurve()=default
ICurve destructor.
A directed edge from one vertex to another, adjacent to two faces.
Definition hydrocouplespatial.h:837
virtual IEdge * sym() const =0
The IEdge from the destination to the origin of this IEdge.
virtual IEdge * origNext() const =0
The next ccw edge around (from) the origin of this IEdge.
virtual ~IEdge()=default
IEdge destructor.
virtual IEdge * rot() const =0
The dual of this edge, directed from its right to its left.
virtual int64_t index() const =0
Index of this edge in its owning mesh or network (IMeshView::edgeNodes() order).
virtual IPolygon * left() const =0
The left face of this edge.
virtual IEdge * leftPrev() const =0
The ccw edge around the left face before this edge.
virtual IEdge * destPrev() const =0
The next cw edge around (into) the destination of this edge.
virtual IEdge * origPrev() const =0
The next cw edge around (from) the origin of this edge.
virtual IEdge * leftNext() const =0
The ccw edge around the left face following this edge.
virtual IEdge * rightPrev() const =0
The IEdge around the right face ccw before this IEdge.
virtual IPolygon * face() const =0
The target face of this edge, if dual.
virtual IPolygon * right() const =0
The right face of this edge.
virtual IEdge * destNext() const =0
The next ccw edge around (into) the destination of this edge.
virtual IVertex * orig() const =0
The origin IVertex of this IEdge.
virtual IEdge * invRot() const =0
The dual of this IEdge, directed from its left to its right.
virtual IEdge * rightNext() const =0
The edge around the right face ccw following this edge.
virtual IVertex * dest() const =0
The destination IVertex of this IEdge.
IEnvelope represents the minimum bounding box of a geometry.
Definition hydrocouplespatial.h:190
virtual double maxZ() const =0
The maximum z-coordinate value for this IEnvelope.
virtual double minZ() const =0
The minimum z-coordinate value for this IEnvelope.
virtual double maxY() const =0
The maximum y-coordinate value for this IEnvelope.
virtual double minX() const =0
The minimum x-coordinate value for this IEnvelope.
virtual ~IEnvelope()=default
IEnvelope destructor.
virtual double minY() const =0
The minimum y-coordinate value for this IEnvelope.
virtual double maxX() const =0
The maximum x-coordinate value for this IEnvelope.
An IGeometryCollection is a geometric object that is a collection of some number of IGeometry objects...
Definition hydrocouplespatial.h:562
virtual int64_t geometryCount() const =0
The number of geometries in this IGeometryCollection.
virtual ~IGeometryCollection()=default
IGeometryCollection destructor.
virtual IGeometry * geometry(int64_t index) const =0
The IGeometry object associated with a specified index.
IGeometryComponentDataItem is an IComponentDataItem whose data is associated with a collection of IGe...
Definition hydrocouplespatial.h:1798
virtual IGeometry * geometry(int64_t geometryIndex) const =0
The IGeometry at the specified index.
virtual int64_t geometryCount() const =0
The number of geometries associated with this data item.
virtual IGeometry::GeometryType geometryType() const =0
The type of the geometries this data item is associated with.
virtual HydroCouple::IDimension * geometryDimension() const =0
The IDimension of the geometries (dimension 0 of shape()).
virtual HydroCouple::Spatial::IEnvelope * envelope() const =0
The IEnvelope bounding all geometries of this data item.
virtual ~IGeometryComponentDataItem()=default
IGeometryComponentDataItem destructor.
IGeometry is the root class of the geometry hierarchy.
Definition hydrocouplespatial.h:238
virtual std::unique_ptr< IGeometry > buffer(double bufferDistance) const =0
Returns a geometric object that represents all Points whose distance from this geometric object is le...
virtual ~IGeometry()=default
IGeometry destructor.
virtual bool is3D() const =0
virtual bool touches(const IGeometry &geom) const =0
virtual double distance(const IGeometry &geom) const =0
Returns the shortest distance between any two Points in the two geometric objects as calculated in th...
virtual bool intersects(const IGeometry &geom) const =0
virtual bool equals(const IGeometry &geom) const =0
virtual std::unique_ptr< IGeometry > convexHull() const =0
virtual std::unique_ptr< IGeometry > intersection(const IGeometry &geom) const =0
virtual bool overlaps(const IGeometry &geom) const =0
virtual std::unique_ptr< IGeometry > difference(const IGeometry &geom) const =0
virtual std::vector< unsigned char > getWKB() const =0
Exports this geometric object to a specific Well-known byte Representation of Geometry.
virtual std::unique_ptr< IGeometry > locateAlong(double value) const =0
virtual bool isEmpty() const =0
If true, then this geometric object represents the empty point set ∅ for the coordinate space.
virtual bool disjoint(const IGeometry &geom) const =0
virtual int64_t index() const =0
index of the geometry if it is part of a collection.
virtual ISpatialReferenceSystem * spatialReferenceSystem() const =0
Spatial reference system of geometric object.
virtual int dimension() const =0
The inherent dimension of this geometric object, which must be less than or equal to the coordinate d...
virtual std::unique_ptr< IGeometry > locateBetween(double mStart, double mEnd) const =0
virtual bool isSimple() const =0
Returns true if this geometric object has no anomalous geometric points, such as self intersection or...
GeometryType
The type of IGeometry.
Definition hydrocouplespatial.h:244
@ MultiSurfaceM
Definition hydrocouplespatial.h:296
@ PolyhedralSurfaceM
Definition hydrocouplespatial.h:299
@ MultiLineStringZM
Definition hydrocouplespatial.h:308
@ GeometryZM
Definition hydrocouplespatial.h:302
@ MultiPointZM
Definition hydrocouplespatial.h:307
@ MultiPointZ
Definition hydrocouplespatial.h:269
@ CompoundCurve
Definition hydrocouplespatial.h:255
@ MultiPolygonZM
Definition hydrocouplespatial.h:309
@ LineStringM
Definition hydrocouplespatial.h:285
@ Point
Definition hydrocouplespatial.h:246
@ Curve
Definition hydrocouplespatial.h:259
@ LineString
Definition hydrocouplespatial.h:247
@ MultiLineStringM
Definition hydrocouplespatial.h:289
@ TIN
Definition hydrocouplespatial.h:262
@ MultiPointM
Definition hydrocouplespatial.h:288
@ MultiPoint
Definition hydrocouplespatial.h:250
@ LineStringZM
Definition hydrocouplespatial.h:304
@ CurveZM
Definition hydrocouplespatial.h:316
@ GeometryCollectionZM
Definition hydrocouplespatial.h:310
@ TriangleZ
Definition hydrocouplespatial.h:268
@ Polygon
Definition hydrocouplespatial.h:248
@ SurfaceZM
Definition hydrocouplespatial.h:317
@ CompoundCurveZM
Definition hydrocouplespatial.h:312
@ CompoundCurveM
Definition hydrocouplespatial.h:293
@ MultiPolygon
Definition hydrocouplespatial.h:252
@ GeometryCollectionZ
Definition hydrocouplespatial.h:272
@ GeometryCollectionM
Definition hydrocouplespatial.h:291
@ CircularStringZM
Definition hydrocouplespatial.h:311
@ Triangle
Definition hydrocouplespatial.h:249
@ SurfaceM
Definition hydrocouplespatial.h:298
@ PolygonM
Definition hydrocouplespatial.h:286
@ SurfaceZ
Definition hydrocouplespatial.h:279
@ MultiSurfaceZ
Definition hydrocouplespatial.h:277
@ CurvePolygonZM
Definition hydrocouplespatial.h:313
@ TINZ
Definition hydrocouplespatial.h:281
@ MultiLineString
Definition hydrocouplespatial.h:251
@ MultiPolygonM
Definition hydrocouplespatial.h:290
@ MultiCurveZM
Definition hydrocouplespatial.h:314
@ MultiSurfaceZM
Definition hydrocouplespatial.h:315
@ PolygonZM
Definition hydrocouplespatial.h:305
@ CurveZ
Definition hydrocouplespatial.h:278
@ PointM
Definition hydrocouplespatial.h:284
@ CurvePolygonM
Definition hydrocouplespatial.h:294
@ CurveM
Definition hydrocouplespatial.h:297
@ GeometryZ
Definition hydrocouplespatial.h:264
@ CircularString
Definition hydrocouplespatial.h:254
@ TINZM
Definition hydrocouplespatial.h:319
@ PointZ
Definition hydrocouplespatial.h:265
@ TriangleZM
Definition hydrocouplespatial.h:306
@ MultiLineStringZ
Definition hydrocouplespatial.h:270
@ GeometryCollection
Definition hydrocouplespatial.h:253
@ PolyhedralSurfaceZM
Definition hydrocouplespatial.h:318
@ Surface
Definition hydrocouplespatial.h:260
@ MultiPolygonZ
Definition hydrocouplespatial.h:271
@ CurvePolygonZ
Definition hydrocouplespatial.h:275
@ MultiCurve
Definition hydrocouplespatial.h:257
@ CompoundCurveZ
Definition hydrocouplespatial.h:274
@ MultiCurveZ
Definition hydrocouplespatial.h:276
@ MultiCurveM
Definition hydrocouplespatial.h:295
@ PolyhedralSurfaceZ
Definition hydrocouplespatial.h:280
@ CircularStringM
Definition hydrocouplespatial.h:292
@ GeometryM
Definition hydrocouplespatial.h:283
@ CurvePolygon
Definition hydrocouplespatial.h:256
@ Geometry
Definition hydrocouplespatial.h:245
@ TINM
Definition hydrocouplespatial.h:300
@ PointZM
Definition hydrocouplespatial.h:303
@ TriangleM
Definition hydrocouplespatial.h:287
@ CircularStringZ
Definition hydrocouplespatial.h:273
@ LineStringZ
Definition hydrocouplespatial.h:266
@ PolyhedralSurface
Definition hydrocouplespatial.h:261
@ MultiSurface
Definition hydrocouplespatial.h:258
@ PolygonZ
Definition hydrocouplespatial.h:267
virtual IEnvelope * envelope() const =0
The minimum bounding box for this Geometry.
virtual bool crosses(const IGeometry &geom) const =0
virtual std::unique_ptr< IGeometry > unionG(const IGeometry &geom) const =0
virtual std::unique_ptr< IGeometry > boundary() const =0
Returns the closure of the combinatorial boundary of this geometric object (Reference [1],...
virtual bool isMeasured() const =0
virtual bool relate(const IGeometry &geom, const std::string &intersectionPatternMatrix) const =0
Tests the DE-9IM relationship between this geometry and geom.
virtual bool within(const IGeometry &geom) const =0
virtual const std::string & id() const =0
id of the geometry.
virtual bool contains(const IGeometry &geom) const =0
virtual std::unique_ptr< IGeometry > symmetricDifference(const IGeometry &geom) const =0
virtual std::string getWKT() const =0
Exports this geometric object to a specific Well-known Text Representation of Geometry.
virtual GeometryType geometryType() const =0
Gets the geometry type of this object.
virtual int coordinateDimension() const =0
Get the dimension of the coordinates in this object.
A polyhedral surface whose values are resolved into vertical layers.
Definition hydrocouplespatial.h:2239
A network carrying a vertical profile, and optionally a channel shape, at each node or edge.
Definition hydrocouplespatial.h:2401
virtual ICrossSection * crossSection(int64_t entityIndex) const =0
The channel shape at one entity, or nullptr where there is none.
Values resolved into vertical layers, whatever the plan geometry.
Definition hydrocouplespatial.h:2197
virtual IVerticalCoordinate * verticalCoordinate() const =0
Where those layers are.
virtual IDimension * layerDimension() const =0
The IDimension of the layers (IDimension::DimensionRole::Layer).
The ILine class is an ILineString with exactly 2 IPoints.
Definition hydrocouplespatial.h:810
virtual ~ILine()=default
ILine destructor.
An ILineString is a Curve with linear interpolation between Points.
Definition hydrocouplespatial.h:773
virtual int64_t pointCount() const =0
The number of IPoints in this ILineString.
virtual IPoint * point(int64_t index) const =0
virtual ~ILineString()=default
ILineString destructor.
An ILinearRing is an ILineString that is both isClosed() and isSimple().
Definition hydrocouplespatial.h:822
virtual ~ILinearRing()=default
ILinearRing destructor.
IMeshView is a bulk, structure-of-arrays view of an unstructured mesh or network: flat coordinate spa...
Definition hydrocouplespatial.h:1657
virtual std::span< const double > nodeZ() const =0
z coordinates of all nodes; the span has nodeCount() elements, or is empty for a 2D mesh.
virtual int64_t nodeCount() const =0
The number of nodes (vertices) in the mesh.
virtual ~IMeshView()=default
IMeshView destructor.
virtual int64_t edgeCount() const =0
The number of edges in the mesh.
virtual std::span< const double > edgeNormalX() const =0
x component of every edge's unit normal, pointing from the left face to the right face as edgeFaces()...
virtual std::span< const int64_t > faceEdgeOffsets() const =0
CSR row offsets into faceEdges(): the edges of face f are faceEdges()[faceEdgeOffsets()[f] ....
virtual std::span< const double > edgeNormalY() const =0
y component of every edge's unit normal; edgeCount() or empty.
virtual std::span< const int64_t > faceNodes() const =0
Concatenated node indexes of all faces, ordered counter-clockwise per face.
virtual std::span< const int64_t > faceEdges() const =0
Concatenated edge indexes of all faces [face_edge_connectivity].
virtual std::span< const int64_t > faceNodeOffsets() const =0
CSR row offsets into faceNodes(): the nodes of face f are faceNodes()[faceNodeOffsets()[f] ....
virtual std::span< const double > edgeLengths() const =0
Length of every edge in the reference system's distance units; edgeCount() or empty.
virtual std::span< const double > nodeY() const =0
y coordinates of all nodes; the span has nodeCount() elements.
virtual std::span< const int64_t > edgeNodes() const =0
Node index pairs of all edges: edge e connects edgeNodes()[2*e] and edgeNodes()[2*e + 1].
virtual std::span< const double > nodeX() const =0
x coordinates of all nodes; the span has nodeCount() elements.
virtual std::span< const double > faceY() const =0
y coordinate of every face's representative point [face_y]; faceCount() or empty.
virtual int64_t faceCount() const =0
The number of faces (patches/cells) in the mesh; 0 for a pure network.
virtual std::span< const double > faceAreas() const =0
Plan area of every face in the reference system's distance units squared; faceCount() or empty.
virtual std::span< const int64_t > edgeFaces() const =0
The two faces of every edge: edge e separates edgeFaces()[2*e] (left, looking from edgeNodes()[2*e] t...
virtual std::span< const double > faceX() const =0
x coordinate of every face's representative point (centroid or circumcentre, producer's choice) [face...
An IMultiCurve is a 1-dimensional IGeometryCollection whose elements are ICurves.
Definition hydrocouplespatial.h:751
virtual bool isClosed() const =0
virtual double length() const =0
The Length of this IMultiCurve which is equal to the sum of the lengths of the element ICurves.
An IMultiLineString is an IMultiCurve whose elements are ILineStrings.
Definition hydrocouplespatial.h:795
virtual ~IMultiLineString()=default
IMultiLineString destructor.
virtual ILineString * lineString(int64_t index) const =0
Returns the ILineString at index.
An IMultiPoint is a 0-dimensional IGeometryCollection.
Definition hydrocouplespatial.h:637
virtual ~IMultiPoint()=default
IMultiPoint destructor.
virtual IPoint * point(int64_t index) const =0
An IMultiPolygon is an IMultiSurface whose elements are IPolygons.
Definition hydrocouplespatial.h:1122
virtual IPolygon * polygon(int64_t index) const =0
A MultiSurface is a 2-dimensional GeometryCollection whose elements are Surfaces, all using coordinat...
Definition hydrocouplespatial.h:1018
virtual ~IMultiSurface()=default
IMultiSurface destructor.
virtual double area() const =0
The area of this ISurface, as measured in the spatial reference system of this ISurface.
virtual std::unique_ptr< IPoint > centroid() const =0
The mathematical centroid for this ISurface as an IPoint.
virtual std::unique_ptr< IPoint > pointOnSurface() const =0
A Point guaranteed to be on this ISurface.
INetworkComponentDataItem is an IComponentDataItem whose data is associated with the edges or the nod...
Definition hydrocouplespatial.h:1842
virtual MeshLocation location() const =0
Which network entity (Node or Edge) this data item's values are attached to.
virtual SpatialDataType networkDataType() const =0
The algebraic structure of the value at each entity (scalar, vector, ...).
virtual VectorBasis vectorBasis() const =0
The frame of vector/tensor values; VectorBasis::Unknown is legal only when networkDataType() is Scala...
virtual ~INetworkComponentDataItem()=default
INetworkComponentDataItem destructor.
virtual IDimension * entityDimension() const =0
The IDimension of the entities (dimension 0 of shape()).
virtual INetwork * network() const =0
The INetwork this data item is associated with.
INetwork represents a graph structure of connected vertices and edges.
Definition hydrocouplespatial.h:1170
virtual int64_t edgeCount() const =0
The number of edges in the network.
virtual IEdge * edge(int64_t index) const =0
The IEdge at the specified index.
virtual int64_t vertexCount() const =0
The number of vertices in the network.
virtual IVertex * vertex(int64_t index) const =0
The IVertex at the specified index.
virtual ~INetwork()=default
INetwork destructor.
virtual const IMeshView * meshView() const =0
Bulk structure-of-arrays view of this network's geometry and connectivity.
An IPoint is a 0-dimensional geometric object and represents a single location in coordinate space.
Definition hydrocouplespatial.h:595
virtual double m() const =0
The m-coordinate value for this IPoint.
virtual double y() const =0
The y-coordinate value for this IPoint.
virtual double x() const =0
The x-coordinate value for this IPoint.
virtual double z() const =0
The z-coordinate value for this IPoint.
virtual ~IPoint()=default
IPoint destructor.
A IPolygon is a planar ISurface defined by 1 exterior boundary and 0 or more interior boundaries.
Definition hydrocouplespatial.h:1082
virtual IPolyhedralSurface * polyhedralSurface() const =0
Gets the polyhedral surface this polygon belongs to.
virtual int64_t interiorRingCount() const =0
virtual ILineString * interiorRing(int64_t index) const =0
virtual ~IPolygon()=default
IPolygon destructor.
virtual ILineString * exteriorRing() const =0
virtual IEdge * edge() const =0
An arbitrary adjacent edge for this IPolygon.
IPolyhedralSurfaceComponentDataItem is an IComponentDataItem whose data is associated with the faces ...
Definition hydrocouplespatial.h:1885
virtual IPolyhedralSurface * polyhedralSurface() const =0
The IPolyhedralSurface this data item is associated with.
virtual MeshLocation location() const =0
Which mesh entity (Node, Edge or Face; Volume for a layered item) this data item's values are attache...
virtual IDimension * entityDimension() const =0
The IDimension of the entities (dimension 0 of shape()).
virtual VectorBasis vectorBasis() const =0
The frame of vector/tensor values; VectorBasis::Unknown is legal only when meshDataType() is Scalar o...
virtual ~IPolyhedralSurfaceComponentDataItem()=default
IPolyhedralSurfaceComponentDataItem destructor.
virtual SpatialDataType meshDataType() const =0
The algebraic structure of the value at each entity (scalar, vector, ...).
An IPolyhedralSurface is a contiguous collection of polygon patches or facets stitched together along...
Definition hydrocouplespatial.h:1216
virtual std::unique_ptr< IMultiPolygon > boundingPolygons(const IPolygon *polygon) const =0
The collection of polygons in this surface that share an edge with the given polygon.
virtual ~IPolyhedralSurface()=default
IPolyhedralSurface destructor.
virtual int64_t patchCount() const =0
The number of polygon patches in this surface.
virtual IPolygon * patch(int64_t index) const =0
The IPolygon patch at the specified index.
virtual IVertex * vertex(int64_t index) const =0
The IVertex at the specified index.
virtual const IMeshView * meshView() const =0
Bulk structure-of-arrays view of this surface's geometry and connectivity.
virtual int64_t vertexCount() const =0
The number of vertices in this surface.
virtual bool isClosed() const =0
Checks whether this surface is closed and therefore bounds a solid.
IRasterBand is a single raster band for an IRaster.
Definition hydrocouplespatial.h:1386
virtual IRaster::RasterDataType dataType() const =0
Raster data type.
virtual IRaster * raster() const =0
Parent IRaster of this IRasterBand.
virtual int64_t ySize() const =0
Number of pixels in y direction.
virtual bool write(int64_t xOffset, int64_t yOffset, int64_t xSize, int64_t ySize, const BufferDescriptor &source, std::string *message=nullptr)=0
Writes a caller-described buffer into a window of the band.
virtual double noData() const =0
The nodata value for this IRasterBand.
virtual ~IRasterBand()=default
IRasterBand destructor.
virtual int64_t xSize() const =0
Number of pixels in the x direction.
virtual bool read(int64_t xOffset, int64_t yOffset, int64_t xSize, int64_t ySize, const BufferDescriptor &destination, std::string *message=nullptr) const =0
Reads a window of the band into a caller-described buffer.
IRasterComponentDataItem is an IComponentDataItem whose data is associated with an IRaster.
Definition hydrocouplespatial.h:1945
virtual ~IRasterComponentDataItem()=default
IRasterComponentDataItem destructor.
virtual IDimension * yDimension() const =0
The IDimension of the raster rows (dimension 1 of shape()).
virtual IDimension * xDimension() const =0
The IDimension of the raster columns (dimension 2 of shape()).
virtual IRaster * raster() const =0
The IRaster this data item is associated with.
virtual IDimension * bandDimension() const =0
The IDimension of the raster bands (dimension 0 of shape()).
A Raster spatial feature.
Definition hydrocouplespatial.h:1292
virtual int64_t xSize() const =0
Number of pixels in the x direction.
virtual int64_t ySize() const =0
Number of pixels in y direction.
virtual void geoTransformation(double *transformationMatrix) const =0
Fetches the affine transformation coefficients.
virtual IRasterBand * getRasterBand(int64_t bandIndex) const =0
Gets the IRasterBand for the band with index bandIndex (non-owning).
virtual int64_t rasterBandCount() const =0
Number of raster bands.
virtual ISpatialReferenceSystem * spatialReferenceSystem() const =0
The ISpatialReferenceSystem represents the spatial reference system of this raster.
virtual void addRasterBand(RasterDataType dataType)=0
Adds a new IRasterBand.
RasterDataType
The data type associated with a raster band.
Definition hydrocouplespatial.h:1305
@ CInt32
Complex Int32.
Definition hydrocouplespatial.h:1325
@ Float32
Thirty two bit floating point.
Definition hydrocouplespatial.h:1319
@ CFloat64
Complex Float64.
Definition hydrocouplespatial.h:1329
@ Int16
Sixteen bit signed integer.
Definition hydrocouplespatial.h:1313
@ ARGB32_Premultiplied
Colour as ARGB32 with red, green and blue premultiplied by alpha.
Definition hydrocouplespatial.h:1333
@ Unknown
Unknown or unspecified type.
Definition hydrocouplespatial.h:1307
@ UInt16
Sixteen bit unsigned integer.
Definition hydrocouplespatial.h:1311
@ Byte
Eight bit unsigned integer.
Definition hydrocouplespatial.h:1309
@ ARGB32
Colour: alpha, red, green, blue, one byte each, most significant byte first.
Definition hydrocouplespatial.h:1331
@ Int32
Thirty two bit signed integer.
Definition hydrocouplespatial.h:1317
@ Float64
Sixty four bit floating point.
Definition hydrocouplespatial.h:1321
@ CFloat32
Complex Float32.
Definition hydrocouplespatial.h:1327
@ CInt16
Complex Int16.
Definition hydrocouplespatial.h:1323
@ UInt32
Thirty two bit unsigned integer.
Definition hydrocouplespatial.h:1315
virtual ~IRaster()=default
IRaster destructor.
IRegularGrid2DComponentDataItem is an IComponentDataItem whose data is associated with the cells of a...
Definition hydrocouplespatial.h:1983
virtual IDimension * cellEdgeDimension() const =0
The IDimension of the edges of a cell, when values are attached to cell edges.
virtual MeshLocation location() const =0
Which grid entity the values are attached to: Face for cells, Edge for cell edges,...
virtual ~IRegularGrid2DComponentDataItem()=default
IRegularGrid2DComponentDataItem destructor.
virtual IDimension * yCellDimension() const =0
The IDimension of the cells in the y direction (dimension 0 of shape()).
virtual IRegularGrid2D * grid() const =0
The IRegularGrid2D this data item is associated with.
virtual IDimension * cellVertexDimension() const =0
The IDimension of the vertices of a cell, when values are attached to cell vertices.
virtual IDimension * xCellDimension() const =0
The IDimension of the cells in the x direction (dimension 1 of shape()).
IRegularGrid2D represents a two-dimensional structured grid of nodes and cells.
Definition hydrocouplespatial.h:1448
virtual double xNodeLocation(int64_t xNodeIndex, int64_t yNodeIndex) const =0
xNodeLocation provides the x location coordinate for the x-node and y-node indexes.
virtual std::span< const double > nodeXs() const =0
Bulk x coordinates of all nodes, row-major [yNode][xNode].
virtual int64_t numYNodes() const =0
numYNodes represents the number of nodes in the y direction.
virtual ISpatialReferenceSystem * spatialReferenceSystem() const =0
The ISpatialReferenceSystem represents the spatial reference system of this geometric object.
virtual int64_t numXNodes() const =0
numXNodes represents the number of nodes in the x direction.
virtual ~IRegularGrid2D()=default
IRegularGrid2D destructor.
virtual RegularGridType gridType() const =0
Gets the type of regular grid.
virtual std::span< const double > nodeYs() const =0
Bulk y coordinates of all nodes, row-major [yNode][xNode].
virtual bool isActive(int64_t xCellIndex, int64_t yCellIndex) const =0
isActive is a bool indicating whether a cell is active.
virtual std::span< const uint8_t > activeCells() const =0
Bulk activity mask of all cells, row-major [yCell][xCell]; nonzero means active.
virtual double yNodeLocation(int64_t xNodeIndex, int64_t yNodeIndex) const =0
yNodeLocation provides the y location coordinate for the x-node and y-node indexes.
IRegularGrid3DComponentDataItem is an IComponentDataItem whose data is associated with the cells of a...
Definition hydrocouplespatial.h:2031
virtual IRegularGrid3D * grid() const =0
The IRegularGrid3D this data item is associated with.
virtual IDimension * zCellDimension() const =0
The IDimension of the cells in the z direction (dimension 0 of shape()).
virtual IDimension * cellFaceDimension() const =0
The IDimension of the faces of a cell, when values are attached to cell faces.
virtual ~IRegularGrid3DComponentDataItem()=default
IRegularGrid3DComponentDataItem destructor.
virtual IDimension * yCellDimension() const =0
The IDimension of the cells in the y direction (dimension 1 of shape()).
virtual IDimension * xCellDimension() const =0
The IDimension of the cells in the x direction (dimension 2 of shape()).
virtual MeshLocation location() const =0
Which grid entity the values are attached to: Volume for cells, Face for cell faces,...
virtual IDimension * cellVertexDimension() const =0
The IDimension of the vertices of a cell, when values are attached to cell vertices.
IRegularGrid3D represents a three-dimensional structured grid of nodes and cells.
Definition hydrocouplespatial.h:1537
virtual double yNodeLocation(int64_t xNodeIndex, int64_t yNodeIndex) const =0
yNodeLocation provides the y location coordinate for the x-node and y-node indexes.
virtual std::span< const double > nodeYs() const =0
Bulk y coordinates of all nodes in a horizontal layer, row-major [yNode][xNode].
virtual int64_t numXNodes() const =0
numXNodes represents the number of nodes in the x direction.
virtual ISpatialReferenceSystem * spatialReferenceSystem() const =0
The ISpatialReferenceSystem represents the spatial reference system of this grid.
virtual double zNodeLocation(int64_t xNodeIndex, int64_t yNodeIndex, int64_t zNodeIndex) const =0
zNodeLocation provides the z location coordinate for the x-node, y-node, and z-node indexes.
virtual std::span< const double > nodeZs() const =0
Bulk z coordinates of all nodes, row-major [zNode][yNode][xNode].
virtual double xNodeLocation(int64_t xNodeIndex, int64_t yNodeIndex) const =0
xNodeLocation provides the x location coordinate for the x-node and y-node indexes.
virtual std::span< const uint8_t > activeCells() const =0
Bulk activity mask of all cells, row-major [zCell][yCell][xCell]; nonzero means active.
virtual RegularGridType gridType() const =0
Gets the type of regular grid.
virtual bool isActive(int64_t xCellIndex, int64_t yCellIndex, int64_t zCellIndex) const =0
isActive is a bool indicating whether a cell is active.
virtual ~IRegularGrid3D()=default
IRegularGrid3D destructor.
virtual int64_t numZNodes() const =0
numZNodes represents the number of nodes in the z direction.
virtual int64_t numYNodes() const =0
numYNodes represents the number of nodes in the y direction.
virtual std::span< const double > nodeXs() const =0
Bulk x coordinates of all nodes in a horizontal layer, row-major [yNode][xNode].
ISpatialReferenceSystem describes the coordinate reference system for spatial geometric objects.
Definition hydrocouplespatial.h:124
virtual ~ISpatialReferenceSystem()=default
ISpatialReferenceSystem destructor.
virtual int authSRID() const =0
Returns the Spatial Reference System ID (SRID) for a geometric object.
virtual const std::string & srText() const =0
Well-known Text description of the Spatial Reference System.
virtual int verticalAuthSRID() const =0
The authority's identifier of the vertical reference system (e.g.
virtual const std::string & verticalAuthName() const =0
Authority of the vertical reference system (e.g.
virtual HydroCouple::IUnit::DistanceUnits verticalDistanceUnits() const =0
The measurement distance units of the vertical axis.
virtual const std::string & verticalSrText() const =0
Well-known Text of the vertical reference system, or empty if undeclared.
virtual HydroCouple::IUnit::DistanceUnits distanceUnits() const =0
The measurement distance units for the horizontal axes of the Spatial Reference System.
virtual const std::string & authName() const =0
The Authority Specific Spatial Reference System Identifier.
A ISurface is a 2-dimensional IGeometry object.
Definition hydrocouplespatial.h:982
virtual double area() const =0
The area of this ISurface, as measured in the spatial reference system of this ISurface.
virtual std::unique_ptr< IPoint > pointOnSurface() const =0
A Point guaranteed to be on this Surface.
virtual std::unique_ptr< IMultiCurve > boundaryMultiCurve() const =0
Gets the boundary of this surface as a multi-curve.
virtual ~ISurface()=default
ISurface destructor.
virtual std::unique_ptr< IPoint > centroid() const =0
The mathematical centroid for this ISurface as a Point.
ITINComponentDataItem is an IPolyhedralSurfaceComponentDataItem whose surface is an ITIN.
Definition hydrocouplespatial.h:1923
virtual ~ITINComponentDataItem()=default
ITINComponentDataItem destructor.
virtual ITIN * TIN() const =0
The ITIN this data item is associated with.
An ITIN is a triangulated irregular network IPolyhedralSurface consisting only of ITriangle patches.
Definition hydrocouplespatial.h:1274
virtual ~ITIN()=default
ITIN destructor.
virtual ITriangle * triangle(int64_t index) const =0
The ITriangle patch at the specified index.
An ITriangle is a IPolygon with 3 distinct, non-collinear vertices and no interior boundary.
Definition hydrocouplespatial.h:1138
virtual IVertex * vertex3() const =0
The third vertex of this ITriangle.
virtual IVertex * vertex1() const =0
The first vertex of this ITriangle.
virtual IVertex * vertex2() const =0
The second vertex of this ITriangle.
virtual ~ITriangle()=default
ITriangle destructor.
virtual IVertex * vertex(int64_t index) const =0
The vertex of this ITriangle at the specified index.
The IVertex class is an IPoint of a topologically aware IGeometry.
Definition hydrocouplespatial.h:655
virtual ~IVertex()=default
IVertex destructor.
virtual IEdge * edge() const =0
An arbitrary outgoing IEdge from this vertex.
Where the layers of a layered or volumetric data item actually are.
Definition hydrocouplespatial.h:2122
virtual int64_t columnCount() const =0
Number of columns (plan entities) this coordinate describes.
virtual uint64_t geometryEpoch() const =0
Counter incremented every time the elevations change.
virtual bool isTimeVarying() const =0
Whether interface elevations change from step to step.
virtual std::span< const double > interfaceElevations() const =0
All interface elevations of all columns, row-major [column][interface], top interface first within a ...
virtual int64_t layerCount() const =0
Number of layers in a column.
virtual VerticalCoordinateKind kind() const =0
The coordinate family.
virtual double interfaceElevation(int64_t cellIndex, int64_t interfaceIndex) const =0
Elevation of one interface in one cell (positive up, in the reference system's vertical datum and ver...
Core interface definitions for the HydroCouple component-based modeling framework.
HydroCouple's interfaces that have a spatial component.
Definition hydrocouplespatial.h:46
SpatialDataType
The algebraic structure of the value at each entity: a scalar, a set of independent scalars,...
Definition hydrocouplespatial.h:78
@ Vector
A vector per entity; component dimension of length 2 or 3 in the order vectorBasis() defines.
Definition hydrocouplespatial.h:84
@ Tensor
A rank-2 tensor per entity; component dimension holding the row-major flattening (4 or 9 entries) in ...
Definition hydrocouplespatial.h:86
@ Scalar
One value per entity; no component dimension.
Definition hydrocouplespatial.h:80
@ MultiScalar
Several independent scalars per entity (e.g. constituents); component dimension of that count,...
Definition hydrocouplespatial.h:82
MeshLocation
Which mesh or network entity a data item's values are attached to.
Definition hydrocouplespatial.h:63
@ Node
Mesh nodes / network nodes (vertices).
Definition hydrocouplespatial.h:64
@ Face
Mesh faces: the patches of a polyhedral surface, the triangles of a TIN.
Definition hydrocouplespatial.h:66
@ Volume
Extruded cells of a layered mesh (Spatial::ILayering).
Definition hydrocouplespatial.h:67
@ Edge
Mesh edges / network edges (links, conduits, reaches).
Definition hydrocouplespatial.h:65
VerticalCoordinateKind
The family a vertical coordinate belongs to.
Definition hydrocouplespatial.h:2084
@ ZStar
Fixed levels rescaled by total depth.
Definition hydrocouplespatial.h:2088
@ Isopycnal
Layers of constant density.
Definition hydrocouplespatial.h:2090
@ DepthBelowSurface
Fixed depths measured down from the moving surface.
Definition hydrocouplespatial.h:2091
@ ZLevel
Fixed elevations; the top layer thins as the surface falls.
Definition hydrocouplespatial.h:2087
@ Sigma
Terrain-following; layers stretch with the free surface.
Definition hydrocouplespatial.h:2086
@ Hybrid
Sigma near the surface, z below a transition depth.
Definition hydrocouplespatial.h:2089
RegularGridType
The types of regular grids.
Definition hydrocouplespatial.h:110
@ Curvilinear
Curvilinear grid.
Definition hydrocouplespatial.h:116
@ Rectilinear
Rectilinear grid.
Definition hydrocouplespatial.h:114
VectorBasis
The frame a vector or tensor value is expressed in.
Definition hydrocouplespatial.h:98
@ AlongEntity
For network edges: one component along the edge from its first node to its second.
Definition hydrocouplespatial.h:103
@ NormalTangential
For edge/face data: component 0 normal to the entity (positive from left face to right face as IMeshV...
Definition hydrocouplespatial.h:102
@ Unknown
Not declared.
Definition hydrocouplespatial.h:99
@ Cartesian
Components along the reference system's x, y (and z) axes, in that order.
Definition hydrocouplespatial.h:100
@ EastNorthUp
Components along local east, north (and up) for geographic reference systems.
Definition hydrocouplespatial.h:101
CrossSectionKind
How a cross-section's shape is held by whoever produced it.
Definition hydrocouplespatial.h:2248
@ StationElevation
Surveyed points across the section (HEC-RAS, SWMM).
Definition hydrocouplespatial.h:2250
@ Analytic
A closed form: circular, trapezoidal, and the rest.
Definition hydrocouplespatial.h:2252
@ WidthElevation
Width as a function of elevation (CE-QUAL-W2).
Definition hydrocouplespatial.h:2251
HydroCouple namespace contains the core interface specifications for the HydroCouple component-based ...
Definition hydrocouple.h:54
BufferDescriptor describes a typed, possibly strided, possibly device-resident multi-dimensional arra...
Definition hydrocouple.h:279