![]() |
OGS
|
|
A set of tools for mapping the elevation of geometric objects.
Definition at line 28 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 26 of file GeoMapper.cpp.
References _geo_name, _geo_objects, _grid, _raster, and _surface_mesh.
| MeshGeoToolsLib::GeoMapper::~GeoMapper | ( | ) |
Definition at line 36 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 604 of file GeoMapper.cpp.
References _geo_name, _geo_objects, _surface_mesh, advancedMapOnMesh(), MeshLib::Mesh::getDimension(), MeshToolsLib::MeshSurfaceExtraction::getMeshSurface(), and MeshGeoToolsLib::mapPolylineOnSurfaceMesh().
Referenced by advancedMapOnMesh(), main(), and MainWindow::mapGeometry().
|
private |
Returns the elevation at Point (x,y) based on a raster.
Definition at line 195 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 206 of file GeoMapper.cpp.
References _grid, _surface_mesh, MathLib::Point3dWithID::getID(), 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 41 of file GeoMapper.cpp.
References _geo_name, _geo_objects, _raster, ERR(), 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 62 of file GeoMapper.cpp.
References _geo_name, _geo_objects, _grid, _surface_mesh, ERR(), MeshLib::Mesh::getDimension(), MeshToolsLib::MeshSurfaceExtraction::getMeshSurface(), GeoLib::isStation(), mapPointDataToMeshSurface(), and mapStationData().
Referenced by createGeometries(), main(), and MainWindow::mapGeometry().
|
private |
Mapping points on a raster.
Definition at line 160 of file GeoMapper.cpp.
References getDemElevation().
Referenced by mapOnDEM().
|
private |
Mapping points on mesh.
Definition at line 170 of file GeoMapper.cpp.
References _surface_mesh, getMeshElevation(), and GeoLib::AABB::getMinMaxPoints().
Referenced by mapOnMesh().
|
private |
Mapping stations, boreholes on a raster or mesh.
Definition at line 126 of file GeoMapper.cpp.
References _grid, _surface_mesh, getDemElevation(), GeoLib::AABB::getMaxPoint(), getMeshElevation(), GeoLib::AABB::getMinPoint(), and GeoLib::isBorehole().
Referenced by mapOnDEM(), and mapOnMesh().
| void MeshGeoToolsLib::GeoMapper::mapToConstantValue | ( | double | value | ) |
Maps geometry to a constant elevation value.
Definition at line 113 of file GeoMapper.cpp.
References _geo_name, _geo_objects, and ERR().
|
private |
Definition at line 74 of file GeoMapper.h.
Referenced by GeoMapper(), advancedMapOnMesh(), mapOnDEM(), mapOnMesh(), and mapToConstantValue().
|
private |
Definition at line 73 of file GeoMapper.h.
Referenced by GeoMapper(), advancedMapOnMesh(), mapOnDEM(), mapOnMesh(), and mapToConstantValue().
|
private |
Definition at line 78 of file GeoMapper.h.
Referenced by GeoMapper(), getMeshElevation(), mapOnMesh(), and mapStationData().
|
private |
only necessary for mapping on DEM
Definition at line 81 of file GeoMapper.h.
Referenced by GeoMapper(), getDemElevation(), and mapOnDEM().
|
private |
only necessary for mapping on mesh
Definition at line 77 of file GeoMapper.h.
Referenced by GeoMapper(), ~GeoMapper(), advancedMapOnMesh(), getMeshElevation(), mapOnMesh(), mapPointDataToMeshSurface(), and mapStationData().