This class implements geometry snap concept. More...
#include <Snap.h>
Public Member Functions | |
| void | add (te::da::DataSet *dataset) |
| virtual void | add (te::gm::Geometry *geom)=0 |
| void | build (te::da::DataSet *dataset) |
| virtual void | clear ()=0 |
| virtual std::string | getDescription () const =0 |
| std::size_t | getMaxGeometries () const |
| virtual std::string | getName () const =0 |
| std::size_t | getNGeometries () const |
| std::string | getSource () const |
| int | getSRID () const |
| double | getTolerance () const |
| virtual bool | search (const te::gm::Coord2D &coord, te::gm::Coord2D &result) |
| void | setTolerance (const double &t) |
| void | setWorld (const double &llx, const double &lly, const double &urx, const double &ury, const std::size_t &width, const std::size_t &height) |
| Snap (const std::string &source, int srid=TE_UNKNOWN_SRS) | |
| virtual | ~Snap () |
Protected Member Functions | |
| te::gm::Envelope | getSearchEnvelope (const te::gm::Coord2D &coord) const |
| virtual bool | search (const te::gm::Envelope &e, te::gm::Coord2D &result)=0 |
Protected Attributes | |
| std::size_t | m_maxGeometries |
| The maximum number of geometries that can be added to the snap. If 0, there will be not limit. More... | |
| std::size_t | m_nGeometries |
| The current number of geometries added to the snap. More... | |
| std::string | m_source |
| The source of the geometries. More... | |
| int | m_srid |
| The SRS of the geometries. More... | |
| double | m_tolerance |
| The tolerance that will be used by the snap. For while, the unit is screen pixels. More... | |
| te::map::WorldDeviceTransformer * | m_transformer |
| For transforming from device coordinate to world coordinate and vice-versa. More... | |
| te::edit::Snap::Snap | ( | const std::string & | source, |
| int | srid = TE_UNKNOWN_SRS |
||
| ) |
| void te::edit::Snap::add | ( | te::da::DataSet * | dataset | ) |
Definition at line 102 of file Snap.cpp.
References te::dt::GEOMETRY_TYPE, te::da::GetFirstPropertyPos(), te::da::DataSet::getGeometry(), and te::da::DataSet::moveNext().
|
pure virtual |
Implemented in te::edit::SnapVertex.
| void te::edit::Snap::build | ( | te::da::DataSet * | dataset | ) |
Definition at line 93 of file Snap.cpp.
Referenced by te::edit::SnapManager::buildSnap().
|
pure virtual |
Implemented in te::edit::SnapVertex.
Referenced by te::edit::SnapManager::clear().
|
pure virtual |
Implemented in te::edit::SnapVertex.
|
pure virtual |
Implemented in te::edit::SnapVertex.
|
protected |
Definition at line 125 of file Snap.cpp.
References te::gm::Envelope::isValid(), te::gm::Envelope::m_llx, te::gm::Envelope::m_lly, te::gm::Envelope::m_urx, te::gm::Envelope::m_ury, TE_TR, te::gm::Coord2D::x, and te::gm::Coord2D::y.
| double te::edit::Snap::getTolerance | ( | ) | const |
Definition at line 75 of file Snap.cpp.
Referenced by te::edit::SnapOptionsDialog::buildOptions().
|
virtual |
|
protectedpure virtual |
Implemented in te::edit::SnapVertex.
| void te::edit::Snap::setWorld | ( | const double & | llx, |
| const double & | lly, | ||
| const double & | urx, | ||
| const double & | ury, | ||
| const std::size_t & | width, | ||
| const std::size_t & | height | ||
| ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |