OGS
|
A set of tools for mapping the elevation of geometric objects.
Definition at line 39 of file GeoMapper.h.
#include <GeoMapper.h>
Public Member Functions | |
GeoMapper (GeoLib::GEOObjects &geo_objects, const std::string &geo_name) | |
~GeoMapper () | |
void | mapOnDEM (std::unique_ptr< GeoLib::Raster const > raster) |
Maps geometry based on a raster file. | |
void | mapOnMesh (MeshLib::Mesh const *const mesh) |
void | mapToConstantValue (double value) |
Maps geometry to a constant elevation value. | |
void | advancedMapOnMesh (MeshLib::Mesh const &mesh) |
Private Member Functions | |
void | mapStationData (std::vector< GeoLib::Point * > const &points) |
Mapping stations, boreholes on a raster or mesh. | |
void | mapPointDataToDEM (std::vector< GeoLib::Point * > const &points) const |
Mapping points on a raster. | |
void | mapPointDataToMeshSurface (std::vector< GeoLib::Point * > const &pnts) |
Mapping points on mesh. | |
double | getMeshElevation (double x, double y, double min_val, double max_val) const |
float | getDemElevation (GeoLib::Point const &pnt) const |
Returns the elevation at Point (x,y) based on a raster. | |
Private Attributes | |
GeoLib::GEOObjects & | _geo_objects |
std::string & | _geo_name |
MeshLib::Mesh * | _surface_mesh |
only necessary for mapping on mesh | |
GeoLib::Grid< MeshLib::Node > * | _grid |
std::unique_ptr< GeoLib::Raster const > | _raster |
only necessary for mapping on DEM | |
MeshGeoToolsLib::GeoMapper::GeoMapper | ( | GeoLib::GEOObjects & | geo_objects, |
const std::string & | geo_name ) |
Definition at line 37 of file GeoMapper.cpp.
MeshGeoToolsLib::GeoMapper::~GeoMapper | ( | ) |
Definition at line 47 of file GeoMapper.cpp.
References _surface_mesh.
void MeshGeoToolsLib::GeoMapper::advancedMapOnMesh | ( | MeshLib::Mesh const & | mesh | ) |
Maps the geometry based on the given mesh file. I.e., all geometric points are assigned an elevation value on the mesh surface. Additional points are inserted whenever a polyline from the original geometry intersects a mesh node or the edge of a mesh element. A new geometry with the given name is inserted into _geo_objects.
mesh | Mesh the geometry is mapped on |
Definition at line 615 of file GeoMapper.cpp.
References MeshLib::Mesh::getDimension(), MeshToolsLib::MeshSurfaceExtraction::getMeshSurface(), and MeshGeoToolsLib::mapPolylineOnSurfaceMesh().
Referenced by main(), and MainWindow::mapGeometry().
|
private |
Returns the elevation at Point (x,y) based on a raster.
Definition at line 206 of file GeoMapper.cpp.
References _raster.
Referenced by mapPointDataToDEM(), and mapStationData().
|
private |
Returns the elevation at Point (x,y) based on a mesh. This uses collision detection for triangles and nearest neighbor for quads. NOTE: This method only returns correct values if the node numbering of the elements is correct!
Definition at line 217 of file GeoMapper.cpp.
References _grid, _surface_mesh, MeshLib::Mesh::getElementsConnectedToNode(), MathLib::Point3dWithID::getID(), GeoLib::Grid< POINT >::getNearestPoint(), MeshLib::Mesh::getNode(), MeshLib::LINE, MeshLib::QUAD, and GeoLib::triangleLineIntersection().
Referenced by mapPointDataToMeshSurface(), and mapStationData().
void MeshGeoToolsLib::GeoMapper::mapOnDEM | ( | std::unique_ptr< GeoLib::Raster const > | raster | ) |
Maps geometry based on a raster file.
Definition at line 52 of file GeoMapper.cpp.
References _geo_name, _geo_objects, _raster, ERR(), GeoLib::GEOObjects::getPointVec(), GeoLib::isStation(), mapPointDataToDEM(), and mapStationData().
Referenced by MainWindow::mapGeometry().
void MeshGeoToolsLib::GeoMapper::mapOnMesh | ( | MeshLib::Mesh const *const | mesh | ) |
Maps the geometry based on the given mesh file. The elevation value of all geometric points are modified such that they are located on the mesh surface.
Definition at line 73 of file GeoMapper.cpp.
References _geo_name, _geo_objects, _grid, _surface_mesh, ERR(), MeshLib::Mesh::getDimension(), MeshToolsLib::MeshSurfaceExtraction::getMeshSurface(), MeshLib::Mesh::getNodes(), MeshLib::Mesh::getNumberOfNodes(), GeoLib::GEOObjects::getPointVec(), GeoLib::isStation(), mapPointDataToMeshSurface(), and mapStationData().
Referenced by createGeometries(), main(), and MainWindow::mapGeometry().
|
private |
Mapping points on a raster.
Definition at line 171 of file GeoMapper.cpp.
References getDemElevation().
Referenced by mapOnDEM().
|
private |
Mapping points on mesh.
Definition at line 181 of file GeoMapper.cpp.
References _surface_mesh, getMeshElevation(), GeoLib::AABB::getMinMaxPoints(), and MeshLib::Mesh::getNodes().
Referenced by mapOnMesh().
|
private |
Mapping stations, boreholes on a raster or mesh.
Definition at line 137 of file GeoMapper.cpp.
References _grid, _surface_mesh, getDemElevation(), GeoLib::AABB::getMaxPoint(), getMeshElevation(), GeoLib::AABB::getMinPoint(), MeshLib::Mesh::getNodes(), and GeoLib::isBorehole().
Referenced by mapOnDEM(), and mapOnMesh().
void MeshGeoToolsLib::GeoMapper::mapToConstantValue | ( | double | value | ) |
Maps geometry to a constant elevation value.
Definition at line 124 of file GeoMapper.cpp.
References _geo_name, _geo_objects, ERR(), and GeoLib::GEOObjects::getPointVec().
|
private |
Definition at line 85 of file GeoMapper.h.
Referenced by mapOnDEM(), mapOnMesh(), and mapToConstantValue().
|
private |
Definition at line 84 of file GeoMapper.h.
Referenced by mapOnDEM(), mapOnMesh(), and mapToConstantValue().
|
private |
Definition at line 89 of file GeoMapper.h.
Referenced by getMeshElevation(), mapOnMesh(), and mapStationData().
|
private |
only necessary for mapping on DEM
Definition at line 92 of file GeoMapper.h.
Referenced by getDemElevation(), and mapOnDEM().
|
private |
only necessary for mapping on mesh
Definition at line 88 of file GeoMapper.h.
Referenced by ~GeoMapper(), getMeshElevation(), mapOnMesh(), mapPointDataToMeshSurface(), and mapStationData().