![]() |
OGS
|
Container class for geometric objects.
This class contains all the methods necessary for the I/O of geometric objects. Said objects are Points, polylines, Surfaces and Stations and they are stored in vectors (arrays) which are identified by a unique name. For a hierarchical definition, surfaces are bounded by polylines and polylines are defined by points. Therefore, a vector of surfaces references a vector polylines and a vector of polylines references a vector of points, respectively. For identification purposes, all of these vectors have the same name, i.e. the polyline- vector named "aaa" references a point vector "aaa". However, this name ("aaa") is unique among all the vectors of the same class, i.e. there exists only one point- vector with this name, etc. Note: The fact that vectors are uniquely named and the same name is assigned to related objects is automatically handled by this class.
For each of these object-classes exists an "add", "remove" and "get"-method which allows for loading/unloading as well as accessing the data, respectively. E.g. for points these methods are "addPointVec(name)", "getPointVec(name)" and "removePointVec(name)". For some objects, additional methods might exist if necessary.
Definition at line 60 of file GEOObjects.h.
#include <GEOObjects.h>
Classes | |
struct | Callbacks |
Public Member Functions | |
void | addPointVec (std::unique_ptr< std::vector< Point * >> points, std::string &name, std::unique_ptr< std::map< std::string, std::size_t >> pnt_id_name_map=nullptr, double eps=std::sqrt(std::numeric_limits< double >::epsilon())) |
const std::vector< Point * > * | getPointVec (const std::string &name) const |
const PointVec * | getPointVecObj (const std::string &name) const |
PointVec * | getPointVecObj (const std::string &name) |
Returns a pointer to a PointVec object for the given name. More... | |
bool | removePointVec (const std::string &name) |
void | addStationVec (std::unique_ptr< std::vector< Point * >> stations, std::string &name) |
Adds a vector of stations with the given name and colour to GEOObjects. More... | |
const std::vector< GeoLib::Point * > * | getStationVec (const std::string &name) const |
Returns the station vector with the given name. More... | |
bool | removeStationVec (const std::string &name) |
Removes the station vector with the given name from GEOObjects. More... | |
void | addPolylineVec (std::unique_ptr< std::vector< Polyline * >> lines, const std::string &name, std::unique_ptr< std::map< std::string, std::size_t >> ply_names=nullptr) |
bool | appendPolylineVec (const std::vector< Polyline * > &polylines, const std::string &name) |
const std::vector< Polyline * > * | getPolylineVec (const std::string &name) const |
const PolylineVec * | getPolylineVecObj (const std::string &name) const |
PolylineVec * | getPolylineVecObj (const std::string &name) |
Returns a pointer to a PolylineVec object for the given name. More... | |
bool | removePolylineVec (const std::string &name) |
void | addSurfaceVec (std::unique_ptr< std::vector< Surface * >> sfc, const std::string &name, std::unique_ptr< std::map< std::string, std::size_t >> sfc_names=nullptr) |
bool | appendSurfaceVec (const std::vector< Surface * > &surfaces, const std::string &name) |
const std::vector< Surface * > * | getSurfaceVec (const std::string &name) const |
Returns the surface vector with the given name as a const. More... | |
SurfaceVec * | getSurfaceVecObj (const std::string &name) |
Returns the surface vector with the given name. More... | |
bool | removeSurfaceVec (const std::string &name) |
const SurfaceVec * | getSurfaceVecObj (const std::string &name) const |
std::vector< std::string > | getGeometryNames () const |
Returns the names of all geometry vectors. More... | |
std::string | getElementNameByID (const std::string &geometry_name, GeoLib::GEOTYPE type, std::size_t id) const |
void | getStationVectorNames (std::vector< std::string > &names) const |
Returns the names of all station vectors. More... | |
bool | isUniquePointVecName (std::string &name) const |
int | mergeGeometries (std::vector< std::string > const &geo_names, std::string &merged_geo_name) |
void | renameGeometry (std::string const &old_name, std::string const &new_name) |
const GeoLib::GeoObject * | getGeoObject (const std::string &geo_name, GeoLib::GEOTYPE type, const std::string &geo_obj_name) const |
Returns the geo object for a geometric item of the given name and type for the associated geometry. More... | |
GeoLib::GeoObject const * | getGeoObject (const std::string &geo_name, const std::string &geo_obj_name) const |
Return named (by the tuple geo_name and geo_obj_name) geo object. More... | |
GEOObjects () | |
~GEOObjects () | |
std::size_t | exists (const std::string &geometry_name) const |
bool | isPntVecUsed (const std::string &name) const |
Checks if the point vector with the given name is referenced in a polyline- or surface vector. More... | |
std::vector< PointVec * > const & | getPoints () const |
Read access to points w/o using a name. More... | |
std::vector< PolylineVec * > const & | getPolylines () const |
Read access to polylines w/o using a name. More... | |
std::vector< SurfaceVec * > const & | getSurfaces () const |
Read access to surfaces w/o using a name. More... | |
Public Attributes | |
std::vector< PointVec * > | _pnt_vecs |
std::vector< PolylineVec * > | _ply_vecs |
std::vector< SurfaceVec * > | _sfc_vecs |
std::unique_ptr< Callbacks > | _callbacks {new Callbacks} |
std::function< void(std::string const &)> | addPolylineVecCallback |
std::function< void(std::string const &)> | appendPolylineVecCallback |
std::function< void(std::string const &)> | removePolylineVecCallback |
std::function< void(std::string const &)> | addSurfaceVecCallback |
std::function< void(std::string const &)> | appendSurfaceVecCallback |
std::function< void(std::string const &)> | removeSurfaceVecCallback |
Private Member Functions | |
bool | mergePoints (std::vector< std::string > const &geo_names, std::string &merged_geo_name, std::vector< std::size_t > &pnt_offsets) |
void | mergePolylines (std::vector< std::string > const &geo_names, std::string const &merged_geo_name, std::vector< std::size_t > const &pnt_offsets) |
void | mergeSurfaces (std::vector< std::string > const &geo_names, std::string const &merged_geo_name, std::vector< std::size_t > const &pnt_offsets) |
|
default |
constructor
GeoLib::GEOObjects::~GEOObjects | ( | ) |
void GeoLib::GEOObjects::addPointVec | ( | std::unique_ptr< std::vector< Point * >> | points, |
std::string & | name, | ||
std::unique_ptr< std::map< std::string, std::size_t >> | pnt_id_name_map = nullptr , |
||
double | eps = std::sqrt(std::numeric_limits<double>::epsilon()) |
||
) |
Adds a vector of points with the given name to GEOObjects.
points | vector of pointers to points |
name | the project name |
pnt_id_name_map | names corresponding to the points |
eps | relative tolerance value for testing of point uniqueness |
Definition at line 51 of file GEOObjects.cpp.
References _callbacks, _pnt_vecs, DBUG(), isUniquePointVecName(), MaterialPropertyLib::name, and GeoLib::PointVec::POINT.
Referenced by FileIO::PetrelInterface::PetrelInterface(), convertMeshNodesToGeometry(), anonymous_namespace{convertMeshToGeo.cpp}::convertMeshNodesToGeoPoints(), convertPoints(), FileIO::SwmmInterface::convertSwmmInputToGeometry(), createGeometries(), GeoLib::Grid< POINT >::createGridGeometry(), GeoLib::DuplicateGeometry::duplicate(), main(), mergeGeometries(), mergePoints(), FileIO::FEFLOWGeoInterface::readFEFLOWFile(), GeoLib::IO::XmlGmlInterface::readFile(), GeoLib::IO::BoostXmlGmlInterface::readFile(), FileIO::Legacy::readGLIFileV4(), FileIO::SHPInterface::readPoints(), FileIO::SHPInterface::readPolylines(), FileIO::TetGenInterface::readTetGenGeometry(), and FileIO::GMSH::GMSHPolygonTree::writeAdditionalPointData().
void GeoLib::GEOObjects::addPolylineVec | ( | std::unique_ptr< std::vector< Polyline * >> | lines, |
const std::string & | name, | ||
std::unique_ptr< std::map< std::string, std::size_t >> | ply_names = nullptr |
||
) |
Adds a vector of polylines with the given name to GEOObjects.
lines | The lines vector. |
name | The geometry to which the given Polyline objects should be added. |
ply_names | map of names and ids that are corresponding to the polylines |
Definition at line 150 of file GEOObjects.cpp.
References _callbacks, _ply_vecs, and MaterialPropertyLib::name.
Referenced by FileIO::PetrelInterface::PetrelInterface(), FileIO::SwmmInterface::convertSwmmInputToGeometry(), createGeometries(), GeoLib::Grid< POINT >::createGridGeometry(), GeoLib::DuplicateGeometry::duplicate(), mergeGeometries(), mergePolylines(), FileIO::FEFLOWGeoInterface::readFEFLOWFile(), GeoLib::IO::XmlGmlInterface::readFile(), GeoLib::IO::BoostXmlGmlInterface::readFile(), FileIO::Legacy::readGLIFileV4(), FileIO::SHPInterface::readPolylines(), and FileIO::GMSH::GMSHPolygonTree::writeAdditionalPointData().
void GeoLib::GEOObjects::addStationVec | ( | std::unique_ptr< std::vector< Point * >> | stations, |
std::string & | name | ||
) |
Adds a vector of stations with the given name and colour to GEOObjects.
Definition at line 122 of file GEOObjects.cpp.
References _callbacks, _pnt_vecs, isUniquePointVecName(), MaterialPropertyLib::name, and GeoLib::PointVec::STATION.
Referenced by FileIO::PetrelInterface::PetrelInterface(), convertPoints(), GeoLib::geoPointsToStations(), MainWindow::loadFile(), GeoLib::IO::XmlStnInterface::readFile(), FileIO::SHPInterface::readStations(), and FileIO::GMSH::GMSHInterface::writeGMSHInputFile().
void GeoLib::GEOObjects::addSurfaceVec | ( | std::unique_ptr< std::vector< Surface * >> | sfc, |
const std::string & | name, | ||
std::unique_ptr< std::map< std::string, std::size_t >> | sfc_names = nullptr |
||
) |
Adds a vector of surfaces with the given name to GEOObjects.
Definition at line 261 of file GEOObjects.cpp.
References _callbacks, _sfc_vecs, and MaterialPropertyLib::name.
Referenced by appendSurfaceVec(), GeoLib::DuplicateGeometry::duplicate(), mergeSurfaces(), GeoLib::IO::XmlGmlInterface::readFile(), GeoLib::IO::BoostXmlGmlInterface::readFile(), FileIO::Legacy::readGLIFileV4(), and FileIO::TetGenInterface::readTetGenGeometry().
bool GeoLib::GEOObjects::appendPolylineVec | ( | const std::vector< Polyline * > & | polylines, |
const std::string & | name | ||
) |
copies the pointers to the polylines in the vector to the PolylineVec with provided name. the pointers are managed by the GEOObjects, i.e. GEOObjects will delete the Polylines at the end of its scope
polylines | the vector with polylines |
name | the name of the internal PolylineVec |
Definition at line 180 of file GEOObjects.cpp.
References _callbacks, _ply_vecs, getName(), and MaterialPropertyLib::name.
Referenced by GEOModels::connectPolylineSegments(), and FileIO::GMSH::GMSHInterface::writeGMSHInputFile().
bool GeoLib::GEOObjects::appendSurfaceVec | ( | const std::vector< Surface * > & | surfaces, |
const std::string & | name | ||
) |
Copies the surfaces in the vector to the SurfaceVec with the given name.
surfaces | the vector with surfaces |
name | the name of the internal PolylineVec |
Definition at line 272 of file GEOObjects.cpp.
References _callbacks, _sfc_vecs, addSurfaceVec(), getName(), and MaterialPropertyLib::name.
Referenced by GEOModels::connectPolylineSegments().
std::size_t GeoLib::GEOObjects::exists | ( | const std::string & | geometry_name | ) | const |
Returns std::numeric_limits<std::size_t>::max() if no geometry of the given name exists or the index of the geometry in _pnt_vecs otherwise
Definition at line 831 of file GEOObjects.cpp.
References _pnt_vecs, and getName().
Referenced by getPointVec(), and getPointVecObj().
std::string GeoLib::GEOObjects::getElementNameByID | ( | const std::string & | geometry_name, |
GeoLib::GEOTYPE | type, | ||
std::size_t | id | ||
) | const |
Definition at line 414 of file GEOObjects.cpp.
References GeoLib::TemplateVec< T >::getNameOfElementByID(), getPointVecObj(), getPolylineVecObj(), getSurfaceVecObj(), MaterialPropertyLib::name, GeoLib::POINT, GeoLib::POLYLINE, and GeoLib::SURFACE.
Referenced by MainWindow::showGeoNameDialog().
std::vector< std::string > GeoLib::GEOObjects::getGeometryNames | ( | ) | const |
Returns the names of all geometry vectors.
Definition at line 401 of file GEOObjects.cpp.
References _pnt_vecs, and GeoLib::PointVec::POINT.
Referenced by GMSHPrefsDialog::GMSHPrefsDialog(), MergeGeometriesDialog::MergeGeometriesDialog(), OGSFileConverter::convertGML2GLI(), isUniquePointVecName(), main(), FileIO::readGeometryFromFile(), MainWindow::save(), FileIO::XmlPrjInterface::write(), and FileIO::Legacy::writeAllDataToGLIFileV4().
GeoLib::GeoObject const * GeoLib::GEOObjects::getGeoObject | ( | const std::string & | geo_name, |
const std::string & | geo_obj_name | ||
) | const |
Return named (by the tuple geo_name and geo_obj_name) geo object.
Definition at line 803 of file GEOObjects.cpp.
References DBUG(), getGeoObject(), GeoLib::POINT, GeoLib::POLYLINE, and GeoLib::SURFACE.
const GeoLib::GeoObject * GeoLib::GEOObjects::getGeoObject | ( | const std::string & | geo_name, |
GeoLib::GEOTYPE | type, | ||
const std::string & | geo_obj_name | ||
) | const |
Returns the geo object for a geometric item of the given name and type for the associated geometry.
Definition at line 746 of file GEOObjects.cpp.
References GeoLib::convertGeoTypeToString(), DBUG(), ERR(), GeoLib::TemplateVec< T >::getElementByName(), getPointVecObj(), getPolylineVecObj(), getSurfaceVecObj(), GeoLib::POINT, GeoLib::POLYLINE, and GeoLib::SURFACE.
Referenced by GEOModels::addNameForObjectPoints(), and getGeoObject().
|
inline |
Read access to points w/o using a name.
Definition at line 286 of file GEOObjects.h.
References _pnt_vecs.
Referenced by MeshGeoToolsLib::constructAdditionalMeshesFromGeoObjects().
const std::vector< Point * > * GeoLib::GEOObjects::getPointVec | ( | const std::string & | name | ) | const |
Returns the point vector with the given name.
Definition at line 71 of file GEOObjects.cpp.
References _pnt_vecs, DBUG(), exists(), and MaterialPropertyLib::name.
Referenced by MeshLib::convertMeshToGeo(), GeoLib::DuplicateGeometry::copyPolylinesVector(), GeoLib::DuplicateGeometry::copySurfacesVector(), createGeometries(), GeoLib::Grid< POINT >::createGridGeometry(), GeoLib::DuplicateGeometry::duplicate(), GeoLib::DuplicateGeometry::getPointVectorCopy(), main(), MeshGeoToolsLib::GeoMapper::mapOnDEM(), MeshGeoToolsLib::GeoMapper::mapOnMesh(), MeshGeoToolsLib::GeoMapper::mapToConstantValue(), mergeGeometries(), GeoLib::IO::XmlGmlInterface::readFile(), GeoLib::IO::BoostXmlGmlInterface::readFile(), FileIO::TetGenInterface::readTetGenGeometry(), FileIO::GMSH::GMSHInterface::writeGMSHInputFile(), and FileIO::TetGenInterface::writeTetGenSmesh().
|
inline |
Returns a pointer to a PointVec object for the given name.
Definition at line 110 of file GEOObjects.h.
References getPointVecObj(), and MaterialPropertyLib::name.
const PointVec * GeoLib::GEOObjects::getPointVecObj | ( | const std::string & | name | ) | const |
search and returns the PointVec object with the given name.
name | the name of the PointVec object |
Definition at line 84 of file GEOObjects.cpp.
References _pnt_vecs, DBUG(), exists(), and MaterialPropertyLib::name.
Referenced by GEOModels::addNameForElement(), GEOModels::addNameForObjectPoints(), GEOModels::addPointVec(), FileIO::GMSH::GMSHPolygonTree::checkIntersectionsSegmentExistingPolylines(), MeshLib::convertMeshToGeo(), FileIO::SwmmInterface::convertSwmmInputToGeometry(), GeoLib::DuplicateGeometry::duplicate(), GeoLib::geoPointsToStations(), getElementNameByID(), getGeoObject(), getPointVecObj(), FileIO::GMSH::GMSHPolygonTree::insertPolyline(), main(), mergePoints(), mergePolylines(), mergeSurfaces(), GeoLib::IO::XmlGmlInterface::readFile(), GeoLib::IO::BoostXmlGmlInterface::readFile(), FileIO::Legacy::readGLIFileV4(), FileIO::SHPInterface::readPolylines(), FileIO::TetGenInterface::readTetGenGeometry(), GEOModels::updateGeometry(), GeoLib::IO::BoostXmlGmlInterface::write(), GeoLib::IO::XmlGmlInterface::write(), FileIO::GMSH::GMSHPolygonTree::writeAdditionalPointData(), FileIO::Legacy::writeAllDataToGLIFileV4(), writeBCsAndGeometry(), FileIO::Legacy::writeGLIFileV4(), and FileIO::GMSH::GMSHInterface::writeGMSHInputFile().
|
inline |
Read access to polylines w/o using a name.
Definition at line 288 of file GEOObjects.h.
References _ply_vecs.
Referenced by MeshGeoToolsLib::constructAdditionalMeshesFromGeoObjects().
const std::vector< Polyline * > * GeoLib::GEOObjects::getPolylineVec | ( | const std::string & | name | ) | const |
Returns the polyline vector with the given name.
Definition at line 210 of file GEOObjects.cpp.
References _ply_vecs, DBUG(), getName(), and MaterialPropertyLib::name.
Referenced by GeoLib::DuplicateGeometry::duplicate(), GeoLib::DuplicateGeometry::getPolylineVectorCopy(), main(), mergePolylines(), FileIO::Legacy::readGLIFileV4(), FileIO::SHPInterface::readPolygons(), and FileIO::GMSH::GMSHInterface::writeGMSHInputFile().
|
inline |
Returns a pointer to a PolylineVec object for the given name.
Definition at line 172 of file GEOObjects.h.
References getPolylineVecObj(), and MaterialPropertyLib::name.
const PolylineVec * GeoLib::GEOObjects::getPolylineVecObj | ( | const std::string & | name | ) | const |
Returns a pointer to a PolylineVec object for the given name as a const.
name | the name of the vector of polylines |
Definition at line 227 of file GEOObjects.cpp.
References _ply_vecs, DBUG(), getName(), and MaterialPropertyLib::name.
Referenced by GEOModels::addNameForElement(), GeoLib::IO::BoostXmlGmlInterface::addPolylinesToPropertyTree(), GEOModels::addPolylineVec(), GEOModels::appendPolylineVec(), GEOModels::connectPolylineSegments(), GeoLib::DuplicateGeometry::duplicate(), getElementNameByID(), getGeoObject(), getPolylineVecObj(), main(), GeoLib::markUnusedPoints(), mergePolylines(), FileIO::Legacy::readGLIFileV4(), MainWindow::showLineEditDialog(), GEOModels::updateGeometry(), GeoLib::IO::XmlGmlInterface::write(), FileIO::Legacy::writeAllDataToGLIFileV4(), and FileIO::Legacy::writeGLIFileV4().
const std::vector< GeoLib::Point * > * GeoLib::GEOObjects::getStationVec | ( | const std::string & | name | ) | const |
Returns the station vector with the given name.
Definition at line 131 of file GEOObjects.cpp.
References _pnt_vecs, DBUG(), MaterialPropertyLib::name, and GeoLib::PointVec::STATION.
Referenced by GEOModels::addStationVec(), MainWindow::exportBoreholesToGMS(), MainWindow::showStationNameDialog(), GEOModels::updateGeometry(), GeoLib::IO::XmlStnInterface::write(), FileIO::Legacy::writeAllDataToGLIFileV4(), and FileIO::GMSH::GMSHInterface::writeGMSHInputFile().
void GeoLib::GEOObjects::getStationVectorNames | ( | std::vector< std::string > & | names | ) | const |
Returns the names of all station vectors.
Definition at line 390 of file GEOObjects.cpp.
References _pnt_vecs, and GeoLib::PointVec::STATION.
Referenced by GMSHPrefsDialog::GMSHPrefsDialog(), MergeGeometriesDialog::MergeGeometriesDialog(), FileIO::XmlPrjInterface::write(), and FileIO::Legacy::writeAllDataToGLIFileV4().
|
inline |
Read access to surfaces w/o using a name.
Definition at line 290 of file GEOObjects.h.
References _sfc_vecs.
Referenced by MeshGeoToolsLib::constructAdditionalMeshesFromGeoObjects().
const std::vector< Surface * > * GeoLib::GEOObjects::getSurfaceVec | ( | const std::string & | name | ) | const |
Returns the surface vector with the given name as a const.
Definition at line 307 of file GEOObjects.cpp.
References _sfc_vecs, DBUG(), getName(), and MaterialPropertyLib::name.
Referenced by GeoLib::DuplicateGeometry::duplicate(), GeoLib::DuplicateGeometry::getSurfaceVectorCopy(), main(), mergeSurfaces(), and FileIO::TetGenInterface::writeTetGenSmesh().
|
inline |
Returns the surface vector with the given name.
Definition at line 205 of file GEOObjects.h.
References MaterialPropertyLib::name.
Referenced by GEOModels::addNameForElement(), GeoLib::IO::BoostXmlGmlInterface::addSurfacesToPropertyTree(), GEOModels::addSurfaceVec(), GEOModels::appendSurfaceVec(), GeoLib::DuplicateGeometry::duplicate(), getElementNameByID(), getGeoObject(), main(), GeoLib::markUnusedPoints(), mergeSurfaces(), GEOModels::updateGeometry(), GeoLib::IO::XmlGmlInterface::write(), FileIO::Legacy::writeAllDataToGLIFileV4(), and FileIO::Legacy::writeGLIFileV4().
const SurfaceVec * GeoLib::GEOObjects::getSurfaceVecObj | ( | const std::string & | name | ) | const |
Returns a pointer to a SurfaceVec object for the given name. The class SurfaceVec stores the relation between surfaces and the names of the surfaces.
name | the name of the vector of surfaces (the project name) |
Definition at line 341 of file GEOObjects.cpp.
References _sfc_vecs, DBUG(), getName(), and MaterialPropertyLib::name.
bool GeoLib::GEOObjects::isPntVecUsed | ( | const std::string & | name | ) | const |
Checks if the point vector with the given name is referenced in a polyline- or surface vector.
Definition at line 369 of file GEOObjects.cpp.
References _ply_vecs, _sfc_vecs, and MaterialPropertyLib::name.
Referenced by removePointVec(), and GEOModels::removePointVec().
bool GeoLib::GEOObjects::isUniquePointVecName | ( | std::string & | name | ) | const |
Determines if the given name is unique among all the names in point vectors and creates a new name if this is not the case. The new name is then simply "name + x", where x>1 is the smallest number that creates a unique name (i.e. "name-2", "name-3", etc.)
name | Original name of the list, this name might be changed within this method if necessary. |
Definition at line 356 of file GEOObjects.cpp.
References getGeometryNames(), BaseLib::getUniqueName(), and MaterialPropertyLib::name.
Referenced by MergeGeometriesDialog::MergeGeometriesDialog(), addPointVec(), and addStationVec().
int GeoLib::GEOObjects::mergeGeometries | ( | std::vector< std::string > const & | geo_names, |
std::string & | merged_geo_name | ||
) |
Method mergeGeometries merges the geometries that are given by the names in the vector. Stations points are not included in the resulting merged geometry.
geo_names | the names of the geometries that are to be merged |
merged_geo_name | the name of the resulting geometry |
Definition at line 435 of file GEOObjects.cpp.
References mergePoints(), mergePolylines(), and mergeSurfaces().
Referenced by GeoLib::Grid< POINT >::createGridGeometry(), FileIO::createSurface(), main(), MainWindow::showMergeGeometriesDialog(), and FileIO::GMSH::GMSHInterface::writeGMSHInputFile().
|
private |
Method merges points from different geometries into one geometry. This is a helper method for GEOObjects::mergeGeometries().
geo_names | The vector of names of the geometries to merge. |
merged_geo_name | The (new) name of the geometry resulting from merging. |
pnt_offsets | offsets in the merged vector storing the points |
Definition at line 459 of file GEOObjects.cpp.
References addPointVec(), GeoLib::PointVec::getItemNameByID(), getPointVecObj(), and GeoLib::TemplateVec< T >::getVector().
Referenced by mergeGeometries().
|
private |
Method merges GeoLib::Polylines from different geometries into one geometry. There isn't a check if the polyline is unique within the given data sets. If there are two polylines with the same name, the second occurrence will lost their name. This is a helper for GEOObjects::mergeGeometries() and should be used only after GEOObjects::mergePoints() is executed.
geo_names | The vector of names of the geometries to merge. |
merged_geo_name | The (new) name of the geometry resulting from merging. |
pnt_offsets | offsets in the merged vector storing the points. |
Definition at line 512 of file GEOObjects.cpp.
References addPolylineVec(), GeoLib::Polyline::getNumberOfPoints(), GeoLib::Polyline::getPointID(), getPointVecObj(), getPolylineVec(), and getPolylineVecObj().
Referenced by mergeGeometries().
|
private |
Method merges GeoLib::Surfaces from different geometries into one geometry. There isn't a check if the GeoLib::Surface is unique within the given data sets. This is a helper for GEOObjects::mergeGeometries() and should be used only after GEOObjects::mergePoints() is executed.
geo_names | The vector of names of the geometries to merge. |
merged_geo_name | The (new) name of the geometry resulting from merging. |
pnt_offsets | offsets in the merged vector storing the points. |
Definition at line 571 of file GEOObjects.cpp.
References addSurfaceVec(), GeoLib::Surface::getNumberOfTriangles(), getPointVecObj(), getSurfaceVec(), and getSurfaceVecObj().
Referenced by mergeGeometries().
bool GeoLib::GEOObjects::removePointVec | ( | const std::string & | name | ) |
If there exists no dependencies the point vector with the given name from GEOObjects will be removed and the method returns true, else the return value is false.
Definition at line 97 of file GEOObjects.cpp.
References _callbacks, _pnt_vecs, DBUG(), isPntVecUsed(), and MaterialPropertyLib::name.
Referenced by consolidateGeometry(), OGSFileConverter::convertGLI2GML(), OGSFileConverter::convertGML2GLI(), FileIO::SwmmInterface::convertSwmmInputToGeometry(), FileIO::createSurface(), GeoLib::IO::XmlGmlInterface::readFile(), GEOModels::removeGeometry(), removeStationVec(), and FileIO::GMSH::GMSHInterface::writeGMSHInputFile().
bool GeoLib::GEOObjects::removePolylineVec | ( | const std::string & | name | ) |
If no Surfaces depends on the vector of Polylines with the given name it will be removed and the method returns true, else the return value is false.
Definition at line 243 of file GEOObjects.cpp.
References _callbacks, _ply_vecs, DBUG(), and MaterialPropertyLib::name.
Referenced by consolidateGeometry(), OGSFileConverter::convertGLI2GML(), OGSFileConverter::convertGML2GLI(), FileIO::createSurface(), GeoLib::IO::XmlGmlInterface::readFile(), GEOModels::removeGeometry(), and FileIO::GMSH::GMSHInterface::writeGMSHInputFile().
|
inline |
Removes the station vector with the given name from GEOObjects.
Definition at line 131 of file GEOObjects.h.
References _callbacks, MaterialPropertyLib::name, and removePointVec().
Referenced by FileIO::GMSH::GMSHInterface::writeGMSHInputFile().
bool GeoLib::GEOObjects::removeSurfaceVec | ( | const std::string & | name | ) |
removes the vector of Surfaces with the given name
Definition at line 323 of file GEOObjects.cpp.
References _callbacks, _sfc_vecs, DBUG(), and MaterialPropertyLib::name.
Referenced by OGSFileConverter::convertGLI2GML(), OGSFileConverter::convertGML2GLI(), FileIO::createSurface(), GEOModels::removeGeometry(), and FileIO::GMSH::GMSHInterface::writeGMSHInputFile().
void GeoLib::GEOObjects::renameGeometry | ( | std::string const & | old_name, |
std::string const & | new_name | ||
) |
Renames an existing geometry, i.e. renames the internal PointVec, PolylineVec and the SurfaceVec objects from old_name
to new_name
. If no such PointVec, PolylineVec and SurfaceVec objects exist nothing will happen.
Definition at line 630 of file GEOObjects.cpp.
References _callbacks, _ply_vecs, _pnt_vecs, and _sfc_vecs.
Referenced by FileIO::createSurface().
Definition at line 302 of file GEOObjects.h.
Referenced by GEOModels::GEOModels(), addPointVec(), addPolylineVec(), addStationVec(), addSurfaceVec(), appendPolylineVec(), appendSurfaceVec(), removePointVec(), removePolylineVec(), removeStationVec(), removeSurfaceVec(), and renameGeometry().
std::vector<PolylineVec*> GeoLib::GEOObjects::_ply_vecs |
vector manages pointers to PolylineVec objects
Definition at line 298 of file GEOObjects.h.
Referenced by ~GEOObjects(), addPolylineVec(), appendPolylineVec(), getPolylines(), getPolylineVec(), getPolylineVecObj(), isPntVecUsed(), removePolylineVec(), and renameGeometry().
std::vector<PointVec*> GeoLib::GEOObjects::_pnt_vecs |
vector manages pointers to PointVec objects
Definition at line 295 of file GEOObjects.h.
Referenced by ~GEOObjects(), addPointVec(), addStationVec(), exists(), getGeometryNames(), getPoints(), getPointVec(), getPointVecObj(), getStationVec(), getStationVectorNames(), removePointVec(), and renameGeometry().
std::vector<SurfaceVec*> GeoLib::GEOObjects::_sfc_vecs |
vector manages pointers to SurfaceVec objects
Definition at line 300 of file GEOObjects.h.
Referenced by ~GEOObjects(), addSurfaceVec(), appendSurfaceVec(), getSurfaces(), getSurfaceVec(), getSurfaceVecObj(), isPntVecUsed(), removeSurfaceVec(), and renameGeometry().
std::function<void(std::string const&)> GeoLib::GEOObjects::addPolylineVecCallback |
Definition at line 304 of file GEOObjects.h.
std::function<void(std::string const&)> GeoLib::GEOObjects::addSurfaceVecCallback |
Definition at line 313 of file GEOObjects.h.
std::function<void(std::string const&)> GeoLib::GEOObjects::appendPolylineVecCallback |
Definition at line 307 of file GEOObjects.h.
std::function<void(std::string const&)> GeoLib::GEOObjects::appendSurfaceVecCallback |
Definition at line 316 of file GEOObjects.h.
std::function<void(std::string const&)> GeoLib::GEOObjects::removePolylineVecCallback |
Definition at line 310 of file GEOObjects.h.
std::function<void(std::string const&)> GeoLib::GEOObjects::removeSurfaceVecCallback |
Definition at line 319 of file GEOObjects.h.