|
SUMO - Simulation of Urban MObility
|
Set z-values for all network positions based on data from a height map. More...
#include <NBHeightMapper.h>
Data Structures | |
| class | QueryResult |
| class for cirumventing the const-restriction of RTree::Search-context More... | |
| class | Triangle |
Public Types | |
| typedef std::vector< const Triangle * > | Triangles |
Public Member Functions | |
| const Boundary & | getBoundary () |
| returns the convex boundary of all known triangles More... | |
| SUMOReal | getZ (const Position &geo) const |
| returns height for the given geo coordinate (WGS84) More... | |
| bool | ready () const |
| returns whether the NBHeightMapper has data More... | |
Static Public Member Functions | |
| static const NBHeightMapper & | get () |
| return the singleton instance (maybe 0) More... | |
| static void | loadIfSet (OptionsCont &oc) |
| loads heigh map data if any loading options are set More... | |
Private Member Functions | |
| void | addTriangle (PositionVector corners) |
| adds one triangles worth of height data More... | |
| void | clearData () |
| clears loaded data More... | |
| int | loadShapeFile (const std::string &file) |
| load height data from Arcgis-shape file and returns the number of More... | |
| NBHeightMapper () | |
| private constructor and destructor (Singleton) More... | |
| NBHeightMapper (const NBHeightMapper &) | |
| Invalidated copy constructor. More... | |
| NBHeightMapper & | operator= (const NBHeightMapper &) |
| Invalidated assignment operator. More... | |
| ~NBHeightMapper () | |
Private Attributes | |
| Boundary | myBoundary |
| convex boundary of all known triangles; More... | |
| TRIANGLE_RTREE_QUAL | myRTree |
| The RTree for spatial queries. More... | |
| Triangles | myTriangles |
Static Private Attributes | |
| static NBHeightMapper | Singleton |
| the singleton instance More... | |
Friends | |
| class | NBHeightMapperTest |
Set z-values for all network positions based on data from a height map.
Importing data from '.shp'-files works only if SUMO was compiled with GDAL-support. If not, an error message is generated.
Definition at line 59 of file NBHeightMapper.h.
| typedef std::vector<const Triangle*> NBHeightMapper::Triangles |
Definition at line 114 of file NBHeightMapper.h.
|
private |
private constructor and destructor (Singleton)
Definition at line 63 of file NBHeightMapper.cpp.
|
private |
Definition at line 68 of file NBHeightMapper.cpp.
References clearData().
|
private |
Invalidated copy constructor.
|
private |
adds one triangles worth of height data
Definition at line 117 of file NBHeightMapper.cpp.
References PositionVector::getBoxBoundary(), myRTree, myTriangles, Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().
Referenced by loadShapeFile().
|
private |
clears loaded data
Definition at line 234 of file NBHeightMapper.cpp.
References myBoundary, myTriangles, and Boundary::reset().
Referenced by ~NBHeightMapper().
|
static |
return the singleton instance (maybe 0)
Definition at line 74 of file NBHeightMapper.cpp.
References Singleton.
Referenced by NBNetBuilder::transformCoordinates().
|
inline |
returns the convex boundary of all known triangles
Definition at line 78 of file NBHeightMapper.h.
References myBoundary, and Singleton.
Referenced by loadIfSet().
returns height for the given geo coordinate (WGS84)
Definition at line 87 of file NBHeightMapper.cpp.
References NBHeightMapper::Triangle::contains(), NBHeightMapper::Triangle::getZ(), myRTree, ready(), toString(), NBHeightMapper::QueryResult::triangles, UNUSED_PARAMETER, WRITE_WARNING, Position::x(), and Position::y().
Referenced by NBNetBuilder::transformCoordinates().
|
static |
loads heigh map data if any loading options are set
| [in] | oc | The options container to get further options from |
| ProcessError | if something fails |
Definition at line 128 of file NBHeightMapper.cpp.
References MsgHandler::endProcessMsg(), getBoundary(), MsgHandler::getMessageInstance(), OptionsCont::getStringVector(), OptionsCont::isSet(), loadShapeFile(), PROGRESS_BEGIN_MESSAGE, Singleton, and toString().
Referenced by NILoader::load().
|
private |
load height data from Arcgis-shape file and returns the number of
| ProcessError |
Definition at line 144 of file NBHeightMapper.cpp.
References Boundary::add(), addTriangle(), myBoundary, SUMOReal, WRITE_ERROR, and WRITE_WARNING.
Referenced by loadIfSet().
|
private |
Invalidated assignment operator.
| bool NBHeightMapper::ready | ( | ) | const |
returns whether the NBHeightMapper has data
Definition at line 80 of file NBHeightMapper.cpp.
References myTriangles.
Referenced by getZ(), and NBNetBuilder::transformCoordinates().
|
friend |
Definition at line 61 of file NBHeightMapper.h.
|
private |
convex boundary of all known triangles;
Definition at line 138 of file NBHeightMapper.h.
Referenced by clearData(), getBoundary(), and loadShapeFile().
|
private |
The RTree for spatial queries.
Definition at line 135 of file NBHeightMapper.h.
Referenced by addTriangle(), and getZ().
|
private |
Definition at line 132 of file NBHeightMapper.h.
Referenced by addTriangle(), clearData(), and ready().
|
staticprivate |
the singleton instance
Definition at line 130 of file NBHeightMapper.h.
Referenced by get(), getBoundary(), and loadIfSet().