OGS
GeoMapper.h
Go to the documentation of this file.
1
15#pragma once
16
17#include <cstddef>
18#include <vector>
19
20#include "GeoLib/GEOObjects.h"
21#include "GeoLib/Grid.h"
22#include "GeoLib/Point.h"
23#include "MathLib/Point3d.h"
24
25namespace MeshLib {
26 class Mesh;
27 class Node;
28}
29
30namespace GeoLib {
31 class Raster;
32}
33
34namespace MeshGeoToolsLib {
35
40{
41public:
42 GeoMapper(GeoLib::GEOObjects &geo_objects, const std::string &geo_name);
43 ~GeoMapper();
44
46 void mapOnDEM(std::unique_ptr<GeoLib::Raster const> raster);
47
52 void mapOnMesh(MeshLib::Mesh const*const mesh);
53
55 void mapToConstantValue(double value);
56
65 void advancedMapOnMesh(MeshLib::Mesh const& mesh);
66
67private:
69 void mapStationData(std::vector<GeoLib::Point*> const& points);
70
72 void mapPointDataToDEM(std::vector<GeoLib::Point*> const& points) const;
73
75 void mapPointDataToMeshSurface(std::vector<GeoLib::Point*> const& pnts);
76
79 double getMeshElevation(double x, double y, double min_val, double max_val) const;
80
82 float getDemElevation(GeoLib::Point const& pnt) const;
83
85 std::string& _geo_name;
86
90
92 std::unique_ptr<GeoLib::Raster const> _raster;
93};
94
95} // end namespace MeshGeoToolsLib
Definition of the GEOObjects class.
Definition of the Point class.
Definition of the Grid class.
Definition of the Point3d class.
Container class for geometric objects.
Definition GEOObjects.h:57
A set of tools for mapping the elevation of geometric objects.
Definition GeoMapper.h:40
GeoMapper(GeoLib::GEOObjects &geo_objects, const std::string &geo_name)
Definition GeoMapper.cpp:37
void mapToConstantValue(double value)
Maps geometry to a constant elevation value.
void mapOnDEM(std::unique_ptr< GeoLib::Raster const > raster)
Maps geometry based on a raster file.
Definition GeoMapper.cpp:52
void mapPointDataToDEM(std::vector< GeoLib::Point * > const &points) const
Mapping points on a raster.
std::string & _geo_name
Definition GeoMapper.h:85
void mapStationData(std::vector< GeoLib::Point * > const &points)
Mapping stations, boreholes on a raster or mesh.
double getMeshElevation(double x, double y, double min_val, double max_val) const
GeoLib::GEOObjects & _geo_objects
Definition GeoMapper.h:84
float getDemElevation(GeoLib::Point const &pnt) const
Returns the elevation at Point (x,y) based on a raster.
std::unique_ptr< GeoLib::Raster const > _raster
only necessary for mapping on DEM
Definition GeoMapper.h:92
MeshLib::Mesh * _surface_mesh
only necessary for mapping on mesh
Definition GeoMapper.h:88
void mapOnMesh(MeshLib::Mesh const *const mesh)
Definition GeoMapper.cpp:73
void advancedMapOnMesh(MeshLib::Mesh const &mesh)
GeoLib::Grid< MeshLib::Node > * _grid
Definition GeoMapper.h:89
void mapPointDataToMeshSurface(std::vector< GeoLib::Point * > const &pnts)
Mapping points on mesh.