This class represents a repository of geometries and features. More...
#include <Repository.h>
Public Member Functions | |
| void | add (te::gm::Geometry *geom) |
| void | add (te::da::ObjectId *id, te::gm::Geometry *geom) |
| void | add (Feature *f) |
| void | clear () |
| const std::vector< Feature * > & | getAllFeatures () const |
| Feature * | getFeature (const te::gm::Envelope &e, int srid) const |
| std::vector< Feature * > | getFeatures (const te::gm::Envelope &e, int srid) const |
| std::vector< Feature * > | getNewFeatures () const |
| std::size_t | getPosition (te::da::ObjectId *id) |
| const std::string & | getSource () const |
| bool | hasIdentifier (te::da::ObjectId *id) |
| void | remove (te::da::ObjectId *id) |
| Repository (const std::string &source) | |
| void | set (te::da::ObjectId *id, te::gm::Geometry *geom) |
| void | set (Feature *f) |
| ~Repository () | |
Private Member Functions | |
| void | buildIndex () |
| void | buildIndex (const std::size_t &pos, te::gm::Geometry *geom) |
| void | clearIndex () |
| void | set (const std::size_t &pos, Feature *f) |
Private Attributes | |
| std::vector< Feature * > | m_features |
| The repository features. More... | |
| te::sam::rtree::Index< std::size_t, 8 > | m_rtree |
| Internal index used to retrieve geometries spatially. More... | |
| std::string | m_source |
| The source of the features. More... | |
This class represents a repository of geometries and features.
Definition at line 62 of file Repository.h.
| te::edit::Repository::Repository | ( | const std::string & | source | ) |
Definition at line 45 of file Repository.cpp.
| te::edit::Repository::~Repository | ( | ) |
Definition at line 50 of file Repository.cpp.
| void te::edit::Repository::add | ( | te::gm::Geometry * | geom | ) |
Definition at line 55 of file Repository.cpp.
References te::edit::GenerateId().
Referenced by te::edit::RepositoryManager::addFeature(), and te::edit::RepositoryManager::addGeometry().
| void te::edit::Repository::add | ( | te::da::ObjectId * | id, |
| te::gm::Geometry * | geom | ||
| ) |
Definition at line 66 of file Repository.cpp.
| void te::edit::Repository::add | ( | Feature * | f | ) |
Definition at line 76 of file Repository.cpp.
References te::edit::Feature::getGeometry(), and te::edit::Feature::getId().
|
private |
Definition at line 258 of file Repository.cpp.
|
private |
Definition at line 266 of file Repository.cpp.
References te::gm::Geometry::getMBR().
| void te::edit::Repository::clear | ( | ) |
Definition at line 229 of file Repository.cpp.
References te::common::FreeContents().
Referenced by te::edit::RepositoryManager::clear(), and te::qt::plugins::edit::ToolBar::onSaveActivated().
|
private |
Definition at line 253 of file Repository.cpp.
| const std::vector< te::edit::Feature * > & te::edit::Repository::getAllFeatures | ( | ) | const |
Definition at line 160 of file Repository.cpp.
Referenced by te::qt::plugins::edit::ToolBar::onSaveActivated().
| te::edit::Feature * te::edit::Repository::getFeature | ( | const te::gm::Envelope & | e, |
| int | srid | ||
| ) | const |
Definition at line 204 of file Repository.cpp.
References te::gm::Geometry::contains(), te::gm::Geometry::crosses(), te::gm::Envelope::getCenter(), te::gm::GetGeomFromEnvelope(), te::gm::Coord2D::x, and te::gm::Coord2D::y.
Referenced by te::edit::RepositoryManager::getFeature().
| std::vector< te::edit::Feature * > te::edit::Repository::getFeatures | ( | const te::gm::Envelope & | e, |
| int | srid | ||
| ) | const |
Definition at line 182 of file Repository.cpp.
References te::gm::Envelope::isValid().
Referenced by te::edit::Renderer::drawRepository(), and te::edit::RepositoryManager::getFeatures().
| std::vector< te::edit::Feature * > te::edit::Repository::getNewFeatures | ( | ) | const |
Definition at line 165 of file Repository.cpp.
References te::edit::Feature::getId(), te::da::ObjectId::getValueAsString(), and NEW_FEATURE_ID_SUFFIX.
| std::size_t te::edit::Repository::getPosition | ( | te::da::ObjectId * | id | ) |
Definition at line 139 of file Repository.cpp.
| const std::string & te::edit::Repository::getSource | ( | ) | const |
Definition at line 155 of file Repository.cpp.
| bool te::edit::Repository::hasIdentifier | ( | te::da::ObjectId * | id | ) |
Definition at line 150 of file Repository.cpp.
Referenced by te::edit::RepositoryManager::hasIdentify().
| void te::edit::Repository::remove | ( | te::da::ObjectId * | id | ) |
Definition at line 119 of file Repository.cpp.
References TE_TR.
| void te::edit::Repository::set | ( | te::da::ObjectId * | id, |
| te::gm::Geometry * | geom | ||
| ) |
Definition at line 96 of file Repository.cpp.
| void te::edit::Repository::set | ( | Feature * | f | ) |
Definition at line 106 of file Repository.cpp.
References te::edit::Feature::getId(), and TE_TR.
|
private |
Definition at line 237 of file Repository.cpp.
|
private |
The repository features.
Definition at line 111 of file Repository.h.
|
private |
Internal index used to retrieve geometries spatially.
Definition at line 112 of file Repository.h.
|
private |
The source of the features.
Definition at line 110 of file Repository.h.