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 56 of file GEOObjects.h.
#include <GEOObjects.h>
Classes | |
struct | Callbacks |
Public Member Functions | |
void | addPointVec (std::vector< Point * > &&points, std::string &name, PointVec::NameIdMap &&pnt_id_name_map, double const eps=std::sqrt(std::numeric_limits< double >::epsilon())) |
void | addPointVec (std::vector< Point * > &&points, std::string &name, double const 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. | |
bool | removePointVec (const std::string &name) |
void | addStationVec (std::vector< Point * > &&stations, std::string &name) |
Adds a vector of stations with the given name and colour to GEOObjects. | |
const std::vector< GeoLib::Point * > * | getStationVec (const std::string &name) const |
Returns the station vector with the given name. | |
bool | removeStationVec (const std::string &name) |
Removes the station vector with the given name from GEOObjects. | |
void | addPolylineVec (std::vector< Polyline * > &&lines, std::string const &name, PolylineVec::NameIdMap &&ply_names) |
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. | |
bool | removePolylineVec (const std::string &name) |
void | addSurfaceVec (std::vector< Surface * > &&sfc, const std::string &name, SurfaceVec::NameIdMap &&sfc_names) |
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. | |
SurfaceVec * | getSurfaceVecObj (const std::string &name) |
Returns the surface vector with the given name. | |
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. | |
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. | |
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 |
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. | |
GEOObjects () | |
~GEOObjects () | |
std::size_t | exists (const std::string &geometry_name) const |
bool | isPntVecUsed (const std::string &name) const |
std::vector< PointVec * > const & | getPoints () const |
Read access to points w/o using a name. | |
std::vector< PolylineVec * > const & | getPolylines () const |
Read access to polylines w/o using a name. | |
std::vector< SurfaceVec * > const & | getSurfaces () const |
Read access to surfaces w/o using a name. | |
Public Attributes | |
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 | |
void | 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) |
Private Attributes | |
std::vector< PointVec * > | _pnt_vecs |
std::vector< PolylineVec * > | _ply_vecs |
std::vector< SurfaceVec * > | _sfc_vecs |
|
default |
constructor
GeoLib::GEOObjects::~GEOObjects | ( | ) |
destructor
Definition at line 41 of file GEOObjects.cpp.
References _ply_vecs, _pnt_vecs, _sfc_vecs, and BaseLib::cleanupVectorElements().
void GeoLib::GEOObjects::addPointVec | ( | std::vector< Point * > && | points, |
std::string & | name, | ||
double const | eps = std::sqrt(std::numeric_limits<double>::epsilon()) ) |
Adds a vector of points with the given name to GEOObjects. This is an overloaded version without the need to pass a name-to-id-map.
points | vector of pointers to points |
name | the project name |
eps | relative tolerance value for testing of point uniqueness |
Definition at line 66 of file GEOObjects.cpp.
References addPointVec().
void GeoLib::GEOObjects::addPointVec | ( | std::vector< Point * > && | points, |
std::string & | name, | ||
PointVec::NameIdMap && | pnt_id_name_map, | ||
double const | 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 47 of file GEOObjects.cpp.
References _callbacks, _pnt_vecs, DBUG(), isUniquePointVecName(), and GeoLib::PointVec::POINT.
Referenced by FileIO::PetrelInterface::PetrelInterface(), addPointVec(), convertMeshNodesToGeometry(), anonymous_namespace{convertMeshToGeo.cpp}::convertMeshNodesToGeoPoints(), convertPoints(), FileIO::SwmmInterface::convertSwmmInputToGeometry(), createGeometries(), GeoLib::Grid< POINT >::createGridGeometry(), FileIO::createSurface(), GeoLib::DuplicateGeometry::duplicate(), generatePolylineGeometry(), generateQuadGeometry(), generateSinglePointGeometry(), FileIO::GMSH::GMSHAdaptiveMeshDensity::getQuadTreeGeometry(), main(), mergeGeometries(), mergePoints(), FileIO::FEFLOWGeoInterface::readFEFLOWFile(), GeoLib::IO::BoostXmlGmlInterface::readFile(), GeoLib::IO::XmlGmlInterface::readFile(), FileIO::Legacy::readGLIFileV4(), FileIO::SHPInterface::readPoints(), FileIO::SHPInterface::readPolylines(), and FileIO::TetGenInterface::readTetGenGeometry().
void GeoLib::GEOObjects::addPolylineVec | ( | std::vector< Polyline * > && | lines, |
std::string const & | name, | ||
PolylineVec::NameIdMap && | ply_names ) |
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 152 of file GEOObjects.cpp.
References _callbacks, and _ply_vecs.
Referenced by FileIO::SwmmInterface::convertSwmmInputToGeometry(), createGeometries(), GeoLib::Grid< POINT >::createGridGeometry(), FileIO::createSurface(), GeoLib::DuplicateGeometry::duplicate(), generatePolylineGeometry(), generateQuadGeometry(), FileIO::GMSH::GMSHAdaptiveMeshDensity::getQuadTreeGeometry(), mergeGeometries(), mergePolylines(), FileIO::FEFLOWGeoInterface::readFEFLOWFile(), GeoLib::IO::BoostXmlGmlInterface::readFile(), GeoLib::IO::XmlGmlInterface::readFile(), FileIO::Legacy::readGLIFileV4(), and FileIO::SHPInterface::readPolylines().
void GeoLib::GEOObjects::addStationVec | ( | std::vector< Point * > && | stations, |
std::string & | name ) |
Adds a vector of stations with the given name and colour to GEOObjects.
Definition at line 123 of file GEOObjects.cpp.
References _callbacks, _pnt_vecs, isUniquePointVecName(), and GeoLib::PointVec::STATION.
Referenced by convertPoints(), GeoLib::geoPointsToStations(), MainWindow::loadFile(), GeoLib::IO::XmlStnInterface::readFile(), FileIO::SHPInterface::readStations(), and FileIO::GMSH::GMSHInterface::writeGMSHInputFile().
void GeoLib::GEOObjects::addSurfaceVec | ( | std::vector< Surface * > && | sfc, |
const std::string & | name, | ||
SurfaceVec::NameIdMap && | sfc_names ) |
Adds a vector of surfaces with the given name to GEOObjects.
Definition at line 240 of file GEOObjects.cpp.
References _callbacks, and _sfc_vecs.
Referenced by appendSurfaceVec(), GeoLib::DuplicateGeometry::duplicate(), mergeSurfaces(), GeoLib::IO::BoostXmlGmlInterface::readFile(), GeoLib::IO::XmlGmlInterface::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 171 of file GEOObjects.cpp.
References _callbacks, _ply_vecs, and GeoLib::findVectorByName().
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 249 of file GEOObjects.cpp.
References _callbacks, _sfc_vecs, addSurfaceVec(), and GeoLib::findVectorByName().
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 744 of file GEOObjects.cpp.
References _pnt_vecs, and GeoLib::findVectorByName().
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 355 of file GEOObjects.cpp.
References GeoLib::TemplateVec< T >::getNameOfElementByID(), getPointVecObj(), getPolylineVecObj(), getSurfaceVecObj(), 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 342 of file GEOObjects.cpp.
References _pnt_vecs, and GeoLib::PointVec::POINT.
Referenced by GMSHPrefsDialog::GMSHPrefsDialog(), MergeGeometriesDialog::MergeGeometriesDialog(), OGSFileConverter::convertGML2GLI(), FileIO::createSurface(), GEOModels::getGeometryNames(), 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 716 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 659 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 297 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 72 of file GEOObjects.cpp.
References _pnt_vecs, DBUG(), and exists().
Referenced by MeshToolsLib::convertMeshToGeo(), GeoLib::DuplicateGeometry::copyPolylinesVector(), GeoLib::DuplicateGeometry::copySurfacesVector(), createGeometries(), GeoLib::Grid< POINT >::createGridGeometry(), FileIO::createSurface(), GeoLib::DuplicateGeometry::duplicate(), GEOModels::getPointVec(), GeoLib::DuplicateGeometry::getPointVectorCopy(), main(), MeshGeoToolsLib::GeoMapper::mapOnDEM(), MeshGeoToolsLib::GeoMapper::mapOnMesh(), MeshGeoToolsLib::GeoMapper::mapToConstantValue(), mergeGeometries(), GeoLib::IO::BoostXmlGmlInterface::readFile(), GeoLib::IO::XmlGmlInterface::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 115 of file GEOObjects.h.
References getPointVecObj().
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 85 of file GEOObjects.cpp.
References _pnt_vecs, DBUG(), and exists().
Referenced by GEOModels::addNameForElement(), GEOModels::addNameForObjectPoints(), GEOModels::addPointVec(), FileIO::GMSH::GMSHPolygonTree::checkIntersectionsSegmentExistingPolylines(), MeshToolsLib::convertMeshToGeo(), FileIO::SwmmInterface::convertSwmmInputToGeometry(), GeoLib::DuplicateGeometry::duplicate(), generatePolylineGeometry(), generateQuadGeometry(), GeoLib::geoPointsToStations(), getElementNameByID(), getGeoObject(), getPointVecObj(), FileIO::GMSH::GMSHAdaptiveMeshDensity::getQuadTreeGeometry(), FileIO::GMSH::GMSHPolygonTree::insertPolyline(), main(), mergePoints(), mergePolylines(), mergeSurfaces(), GeoLib::IO::BoostXmlGmlInterface::readFile(), GeoLib::IO::XmlGmlInterface::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 299 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 189 of file GEOObjects.cpp.
References _ply_vecs, DBUG(), and getName().
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 176 of file GEOObjects.h.
References getPolylineVecObj().
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 206 of file GEOObjects.cpp.
References _ply_vecs, DBUG(), and getName().
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::GMSH::GMSHPolygonTree::writeAdditionalPointData(), 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 133 of file GEOObjects.cpp.
References _pnt_vecs, DBUG(), 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 331 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 301 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 270 of file GEOObjects.cpp.
References _sfc_vecs, DBUG(), and GeoLib::findVectorByName().
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 208 of file GEOObjects.h.
References getSurfaceVecObj().
Referenced by GEOModels::addNameForElement(), GeoLib::IO::BoostXmlGmlInterface::addSurfacesToPropertyTree(), GEOModels::addSurfaceVec(), GEOModels::appendSurfaceVec(), GeoLib::DuplicateGeometry::duplicate(), getElementNameByID(), getGeoObject(), getSurfaceVecObj(), 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 299 of file GEOObjects.cpp.
References _sfc_vecs, DBUG(), and GeoLib::findVectorByName().
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 324 of file GEOObjects.cpp.
References _ply_vecs, _sfc_vecs, and GeoLib::findVectorByName().
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 311 of file GEOObjects.cpp.
References getGeometryNames(), and BaseLib::getUniqueName().
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 376 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 397 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 444 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 499 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 98 of file GEOObjects.cpp.
References _callbacks, _pnt_vecs, DBUG(), and isPntVecUsed().
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 222 of file GEOObjects.cpp.
References _callbacks, _ply_vecs, and DBUG().
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 135 of file GEOObjects.h.
References _callbacks, 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 283 of file GEOObjects.cpp.
References _callbacks, _sfc_vecs, DBUG(), and GeoLib::findVectorByName().
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 554 of file GEOObjects.cpp.
References _callbacks, _ply_vecs, _pnt_vecs, _sfc_vecs, and GeoLib::findVectorByName().
Referenced by FileIO::createSurface().
Definition at line 303 of file GEOObjects.h.
Referenced by GEOModels::GEOModels(), addPointVec(), addPolylineVec(), addStationVec(), addSurfaceVec(), appendPolylineVec(), appendSurfaceVec(), removePointVec(), removePolylineVec(), removeStationVec(), removeSurfaceVec(), and renameGeometry().
|
private |
vector manages pointers to PolylineVec objects
Definition at line 369 of file GEOObjects.h.
Referenced by ~GEOObjects(), addPolylineVec(), appendPolylineVec(), getPolylines(), getPolylineVec(), getPolylineVecObj(), isPntVecUsed(), removePolylineVec(), and renameGeometry().
|
private |
vector manages pointers to PointVec objects
Definition at line 367 of file GEOObjects.h.
Referenced by ~GEOObjects(), addPointVec(), addStationVec(), exists(), getGeometryNames(), getPoints(), getPointVec(), getPointVecObj(), getStationVec(), getStationVectorNames(), removePointVec(), and renameGeometry().
|
private |
vector manages pointers to SurfaceVec objects
Definition at line 371 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 |
std::function<void(std::string const&)> GeoLib::GEOObjects::addSurfaceVecCallback |
std::function<void(std::string const&)> GeoLib::GEOObjects::appendPolylineVecCallback |
std::function<void(std::string const&)> GeoLib::GEOObjects::appendSurfaceVecCallback |
std::function<void(std::string const&)> GeoLib::GEOObjects::removePolylineVecCallback |
std::function<void(std::string const&)> GeoLib::GEOObjects::removeSurfaceVecCallback |