h5geo 0.4.0
C++17 and python API to work with geo-data (seismic, wells, maps, other in process) based on HDF5. Aimed at geoscientists and developers.
Loading...
Searching...
No Matches
h5baseobject.h
1#ifndef H5BASEOBJECT_H
2#define H5BASEOBJECT_H
3
4#include "h5base.h"
5
6#ifdef H5GEO_USE_GDAL
7class OGRCoordinateTransformation;
8#endif
9
12class H5BaseObject : public H5Base
13{
14protected:
15 virtual ~H5BaseObject() = default;
16
17public:
20 const std::string& name) = 0;
23 h5gt::Group group) = 0;
24
25 virtual H5Horizon* openHorizon(
26 const std::string& name) = 0;
27 virtual H5Horizon* openHorizon(
28 h5gt::Group group) = 0;
29
30 virtual H5Points1* createPoints1(
31 std::string& name,
33 h5geo::CreationType createFlag) = 0;
34 virtual H5Points1* createPoints1(
35 h5gt::Group group,
37 h5geo::CreationType createFlag) = 0;
38 virtual H5Points2* createPoints2(
39 std::string& name,
41 h5geo::CreationType createFlag) = 0;
42 virtual H5Points2* createPoints2(
43 h5gt::Group group,
45 h5geo::CreationType createFlag) = 0;
46 virtual H5Points3* createPoints3(
47 std::string& name,
49 h5geo::CreationType createFlag) = 0;
50 virtual H5Points3* createPoints3(
51 h5gt::Group group,
53 h5geo::CreationType createFlag) = 0;
54 virtual H5Points4* createPoints4(
55 std::string& name,
57 h5geo::CreationType createFlag) = 0;
58 virtual H5Points4* createPoints4(
59 h5gt::Group group,
61 h5geo::CreationType createFlag) = 0;
62
63 virtual H5Horizon* createHorizon(
64 std::string& name,
66 h5geo::CreationType createFlag) = 0;
67 virtual H5Horizon* createHorizon(
68 h5gt::Group group,
70 h5geo::CreationType createFlag) = 0;
71
72#ifdef H5GEO_USE_GDAL
77 virtual OGRCoordinateTransformation* createCoordinateTransformationToReadData(
78 const std::string& unitsTo) = 0;
83 virtual OGRCoordinateTransformation* createCoordinateTransformationToWriteData(
84 const std::string& unitsFrom) = 0;
85#endif
86
88 virtual bool setSpatialReference(const std::string& str) = 0;
90 virtual bool setSpatialReference(
91 const std::string& authName, const std::string& code) = 0;
93 virtual bool setLengthUnits(const std::string& str) = 0;
95 virtual bool setTemporalUnits(const std::string& str) = 0;
97 virtual bool setAngularUnits(const std::string& str) = 0;
99 virtual bool setDataUnits(const std::string& str) = 0;
101 virtual bool setNullValue(double val) = 0;
102
104 virtual std::string getSpatialReference() = 0;
106 virtual std::string getLengthUnits() = 0;
108 virtual std::string getTemporalUnits() = 0;
110 virtual std::string getAngularUnits() = 0;
112 virtual std::string getDataUnits() = 0;
114 virtual double getNullValue() = 0;
115
117 virtual h5gt::File getH5File() const = 0;
119 virtual h5gt::Group getObjG() const = 0;
120
122 virtual std::string getName() const = 0;
124 virtual std::string getFullName() const = 0;
125
127 virtual std::vector<h5gt::Group> getObjGroupList(const h5geo::ObjectType& objType, bool recursive) = 0;
129 virtual std::vector<std::string> getObjNameList(const h5geo::ObjectType& objType, bool recursive) = 0;
131 virtual size_t getObjCount(const h5geo::ObjectType& objType, bool recursive) = 0;
132
136 virtual bool isEqual(H5BaseObject* other) const = 0;
137
139 virtual bool operator == (const H5BaseObject& other) const = 0;
141 virtual bool operator != (const H5BaseObject& other) const = 0;
142};
143
144using H5BaseObject_ptr = std::unique_ptr<H5BaseObject, h5geo::ObjectDeleter>;
145
146#endif // H5BASEOBJECT_H
Base class for all geo-containers and geo-objects.
Definition h5base.h:182
Base class for geo-objects.
Definition h5baseobject.h:13
virtual bool setNullValue(double val)=0
Set NULL value for the current geo-object.
virtual bool setDataUnits(const std::string &str)=0
Set data units for the current geo-object.
virtual bool setLengthUnits(const std::string &str)=0
Set length units for the current geo-object.
virtual bool operator!=(const H5BaseObject &other) const =0
Check if geo-objects are not the same (compares HDF5 Groups)
virtual H5BasePoints * openPoints(h5gt::Group group)=0
Open H5BasePoints derived points.
virtual bool setSpatialReference(const std::string &str)=0
Set spatial reference for current geo-object using authName:code form.
virtual std::string getTemporalUnits()=0
Get temporal units for the current geo-object.
virtual double getNullValue()=0
Get NULL value for the current geo-object.
virtual std::string getDataUnits()=0
Get data units for the current geo-object.
virtual std::string getName() const =0
Get geo-object's name without path.
virtual h5gt::File getH5File() const =0
Get HDF5 file.
virtual size_t getObjCount(const h5geo::ObjectType &objType, bool recursive)=0
Get number of geo-objects of specified type within current geo-object.
virtual std::string getLengthUnits()=0
Get length units for the current geo-object.
virtual bool isEqual(H5BaseObject *other) const =0
Check if geo-objects are the same.
virtual std::string getFullName() const =0
Get geo-object's name with full path to that object.
virtual std::vector< h5gt::Group > getObjGroupList(const h5geo::ObjectType &objType, bool recursive)=0
Find all geo-objects of specified type within current geo-object and return them as vector of Groups.
virtual H5BasePoints * openPoints(const std::string &name)=0
Open H5BasePoints derived points.
virtual std::vector< std::string > getObjNameList(const h5geo::ObjectType &objType, bool recursive)=0
Find all geo-objects of specified type within current geo-object and return them as vector of names.
virtual bool setTemporalUnits(const std::string &str)=0
Set temporal units for the current geo-object.
virtual bool setSpatialReference(const std::string &authName, const std::string &code)=0
Set spatial reference for current geo-object.
virtual bool setAngularUnits(const std::string &str)=0
Set angular units for the current geo-object.
virtual std::string getAngularUnits()=0
Get angular units for the current geo-object.
virtual h5gt::Group getObjG() const =0
Get HDF5 Group.
virtual bool operator==(const H5BaseObject &other) const =0
Check if geo-objects are the same (compares HDF5 Groups)
virtual std::string getSpatialReference()=0
Get spatial reference for current geo-object.
Base class for Points.
Definition h5basepoints.h:16
Provides API to work with horizons.
Definition h5horizon.h:17
Provides API to work with 1D points.
Definition h5points1.h:12
Provides API to work with 2D points.
Definition h5points2.h:12
Provides API to work with 3D points.
Definition h5points3.h:12
Provides API to work with 4D points.
Definition h5points4.h:12
CreationType
Definition h5enum.h:468
Class for creating H5Horizon.
Definition h5base.h:87
Common class for creating H5Points1, H5Points2, H5Points3, H5Points4.
Definition h5base.h:71