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
h5mapimpl.h
1#ifndef H5MAPIMPL_H
2#define H5MAPIMPL_H
3
4#include "../h5map.h"
5#include "h5baseobjectimpl.h"
6
7class H5MapImpl : public H5BaseObjectImpl<H5Map>
8{
9protected:
10 explicit H5MapImpl(const h5gt::Group &group);
11 virtual ~H5MapImpl() = default;
12
13public:
14
15 #ifdef H5GEO_USE_GDAL
16 virtual bool readRasterCoordinates(
17 const std::string& file,
18 const std::string& lengthUnits) override;
19 virtual bool readRasterSpatialReference(const std::string& file) override;
20 virtual bool readRasterLengthUnits(const std::string& file) override;
21 virtual bool readRasterData(
22 const std::string& file,
23 const std::string& dataUnits) override;
24 #endif // H5GEO_USE_GDAL
25
26 virtual bool writeData(
27 Eigen::Ref<Eigen::MatrixXd> M,
28 const std::string& dataUnits = "") override;
29
30 virtual Eigen::MatrixXd getData(const std::string& dataUnits = "") override;
31
32 virtual bool setDomain(const h5geo::Domain& domain) override;
33 virtual bool setOrigin(
34 Eigen::Ref<Eigen::Vector2d> v,
35 const std::string& lengthUnits = "",
36 bool doCoordTransform = false) override;
37 virtual bool setPoint1(
38 Eigen::Ref<Eigen::Vector2d> v,
39 const std::string& lengthUnits = "",
40 bool doCoordTransform = false) override;
41 virtual bool setPoint2(
42 Eigen::Ref<Eigen::Vector2d> v,
43 const std::string& lengthUnits = "",
44 bool doCoordTransform = false) override;
45
46 virtual std::optional<h5gt::Group> addAttributeMap(H5Map* map, std::string name = "") override;
47 virtual std::optional<h5gt::Group> addInternalAttributeMap(H5Map* map, std::string name = "") override;
48 virtual std::optional<h5gt::Group> addExternalAttributeMap(H5Map* map, std::string name = "") override;
49 virtual bool removeAttributeMap(const std::string& name) override;
50 virtual H5Map* openAttributeMap(const std::string& name) override;
51 virtual std::vector<h5gt::Group> getAttributeMapGroupList() override;
52 virtual std::vector<std::string> getAttributeMapNameList() override;
53 virtual size_t getAttributeMapCount() override;
54
55 virtual h5geo::Domain getDomain() override;
56 virtual Eigen::VectorXd getOrigin(
57 const std::string& lengthUnits = "",
58 bool doCoordTransform = false) override;
59 virtual Eigen::VectorXd getPoint1(
60 const std::string& lengthUnits = "",
61 bool doCoordTransform = false) override;
62 virtual Eigen::VectorXd getPoint2(
63 const std::string& lengthUnits = "",
64 bool doCoordTransform = false) override;
65 virtual size_t getNX() override;
66 virtual size_t getNY() override;
67
68 virtual H5MapParam getParam() override;
69
70 virtual H5MapContainer* openMapContainer() const override;
71
72 virtual std::optional<h5gt::DataSet> getMapD() const override;
73
74 //----------- FRIEND CLASSES -----------
75 friend class H5MapContainerImpl;
76 friend class H5BaseObjectImpl<H5Map>;
77 friend H5Map* h5geo::openMap(h5gt::Group group);
78};
79
80#endif // H5MAPIMPL_H
Definition h5baseobjectimpl.h:12
A container built around HDF5 file and used for storing and manipulating H5Map objects.
Definition h5mapcontainer.h:15
Definition h5mapcontainerimpl.h:8
Provides API to work with maps.
Definition h5map.h:19
Definition h5mapimpl.h:8
virtual bool removeAttributeMap(const std::string &name) override
Remove attribute map.
Definition h5mapimpl.cpp:291
virtual bool setPoint1(Eigen::Ref< Eigen::Vector2d > v, const std::string &lengthUnits="", bool doCoordTransform=false) override
Set coordinates of upper-right matrix corner.
Definition h5mapimpl.cpp:193
virtual std::optional< h5gt::Group > addExternalAttributeMap(H5Map *map, std::string name="") override
Add internal attribute map.
Definition h5mapimpl.cpp:271
virtual Eigen::VectorXd getPoint1(const std::string &lengthUnits="", bool doCoordTransform=false) override
Get coordinates of upper-right matrix corner.
Definition h5mapimpl.cpp:360
virtual std::vector< std::string > getAttributeMapNameList() override
Find and return vector of attribute maps names within current map.
Definition h5mapimpl.cpp:317
virtual std::vector< h5gt::Group > getAttributeMapGroupList() override
Find and return vector of attribute maps Groups within current map.
Definition h5mapimpl.cpp:313
virtual bool writeData(Eigen::Ref< Eigen::MatrixXd > M, const std::string &dataUnits="") override
Write data to DataSet.
Definition h5mapimpl.cpp:131
virtual bool setOrigin(Eigen::Ref< Eigen::Vector2d > v, const std::string &lengthUnits="", bool doCoordTransform=false) override
Set coordinates of upper-left matrix corner.
Definition h5mapimpl.cpp:167
virtual std::optional< h5gt::Group > addInternalAttributeMap(H5Map *map, std::string name="") override
Add internal attribute map.
Definition h5mapimpl.cpp:251
virtual std::optional< h5gt::DataSet > getMapD() const override
Get current map's DataSet.
Definition h5mapimpl.cpp:501
virtual Eigen::MatrixXd getData(const std::string &dataUnits="") override
Read data from DataSet.
Definition h5mapimpl.cpp:149
virtual size_t getAttributeMapCount() override
Get number of atribute maps within current map.
Definition h5mapimpl.cpp:321
virtual size_t getNX() override
Get number of Eigen column-major matrix columns.
Definition h5mapimpl.cpp:418
virtual Eigen::VectorXd getPoint2(const std::string &lengthUnits="", bool doCoordTransform=false) override
Get coordinates of bottom-left matrix corner.
Definition h5mapimpl.cpp:389
virtual Eigen::VectorXd getOrigin(const std::string &lengthUnits="", bool doCoordTransform=false) override
Get coordinates of upper-left matrix corner.
Definition h5mapimpl.cpp:331
virtual H5MapContainer * openMapContainer() const override
Open H5MapContainer where current map resides.
Definition h5mapimpl.cpp:494
virtual H5MapParam getParam() override
Get parameters that were used to create current map.
Definition h5mapimpl.cpp:444
virtual bool setDomain(const h5geo::Domain &domain) override
Set domain for the map (TVD, TVDSS, TWT, OWT)
Definition h5mapimpl.cpp:160
virtual H5Map * openAttributeMap(const std::string &name) override
Open attribute map.
Definition h5mapimpl.cpp:302
virtual bool setPoint2(Eigen::Ref< Eigen::Vector2d > v, const std::string &lengthUnits="", bool doCoordTransform=false) override
Set coordinates of bottom-left matrix corner.
Definition h5mapimpl.cpp:219
virtual size_t getNY() override
Get number of Eigen column-major matrix rows.
Definition h5mapimpl.cpp:431
virtual h5geo::Domain getDomain() override
Get domain (TVD, TVDSS, TWT, OWT)
Definition h5mapimpl.cpp:325
virtual std::optional< h5gt::Group > addAttributeMap(H5Map *map, std::string name="") override
Add attribute map.
Definition h5mapimpl.cpp:244
H5GEO_EXPORT H5Map * openMap(h5gt::Group group)
Factory function for opening H5Map.
Definition h5baseimpl.cpp:2026
Class for creating H5Map.
Definition h5base.h:98