te::edit::SnapVertex Class Reference

This class implements a vertex search snap. More...

#include <SnapVertex.h>

Inheritance diagram for te::edit::SnapVertex:
te::edit::Snap

Public Member Functions

void add (te::gm::Geometry *geom)
 
void add (te::da::DataSet *dataset)
 
void build (te::da::DataSet *dataset)
 
void clear ()
 
std::string getDescription () const
 
std::size_t getMaxGeometries () const
 
std::string getName () const
 
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)
 
 SnapVertex (const std::string &source, int srid=TE_UNKNOWN_SRS)
 
 ~SnapVertex ()
 

Static Public Member Functions

static SnapBuilder (const std::string &source, int srid)
 

Protected Member Functions

te::gm::Envelope getSearchEnvelope (const te::gm::Coord2D &coord) const
 
bool search (const te::gm::Envelope &e, te::gm::Coord2D &result)
 

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::WorldDeviceTransformerm_transformer
 For transforming from device coordinate to world coordinate and vice-versa. More...
 

Private Attributes

std::vector< te::gm::Coord2Dm_coords
 The snap coordinates. More...
 
te::sam::rtree::Index< std::size_t, 8 > m_rtree
 Internal index used to retrieve geometries spatially. More...
 

Detailed Description

This class implements a vertex search snap.

Definition at line 45 of file SnapVertex.h.

Constructor & Destructor Documentation

te::edit::SnapVertex::SnapVertex ( const std::string &  source,
int  srid = TE_UNKNOWN_SRS 
)

Definition at line 33 of file SnapVertex.cpp.

References ~SnapVertex().

Referenced by Builder().

te::edit::SnapVertex::~SnapVertex ( )
default

Referenced by SnapVertex().

Member Function Documentation

void te::edit::Snap::add ( te::da::DataSet dataset)
inherited
void te::edit::Snap::build ( te::da::DataSet dataset)
inherited

Definition at line 93 of file Snap.cpp.

References te::edit::Snap::add(), and te::edit::Snap::clear().

Referenced by te::edit::SnapManager::buildSnap().

te::edit::Snap * te::edit::SnapVertex::Builder ( const std::string &  source,
int  srid 
)
static

Definition at line 79 of file SnapVertex.cpp.

References SnapVertex().

Referenced by te::edit::Module::Module().

void te::edit::SnapVertex::clear ( )
virtual
std::string te::edit::SnapVertex::getDescription ( ) const
virtual

Implements te::edit::Snap.

Definition at line 74 of file SnapVertex.cpp.

std::size_t te::edit::Snap::getMaxGeometries ( ) const
inherited

Definition at line 70 of file Snap.cpp.

References te::edit::Snap::m_maxGeometries.

std::string te::edit::SnapVertex::getName ( ) const
virtual

Implements te::edit::Snap.

Definition at line 69 of file SnapVertex.cpp.

std::size_t te::edit::Snap::getNGeometries ( ) const
inherited

Definition at line 65 of file Snap.cpp.

References te::edit::Snap::m_nGeometries.

std::string te::edit::Snap::getSource ( ) const
inherited

Definition at line 55 of file Snap.cpp.

References te::edit::Snap::m_source.

int te::edit::Snap::getSRID ( ) const
inherited

Definition at line 60 of file Snap.cpp.

References te::edit::Snap::m_srid.

double te::edit::Snap::getTolerance ( ) const
inherited

Definition at line 75 of file Snap.cpp.

References te::edit::Snap::m_tolerance.

Referenced by te::edit::SnapOptionsDialog::buildOptions().

bool te::edit::Snap::search ( const te::gm::Coord2D coord,
te::gm::Coord2D result 
)
virtualinherited

Definition at line 118 of file Snap.cpp.

References te::edit::Snap::getSearchEnvelope().

void te::edit::Snap::setTolerance ( const double &  t)
inherited

Definition at line 80 of file Snap.cpp.

References te::edit::Snap::m_tolerance.

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 
)
inherited

Definition at line 85 of file Snap.cpp.

References te::edit::Snap::m_transformer.

Member Data Documentation

std::vector<te::gm::Coord2D> te::edit::SnapVertex::m_coords
private

The snap coordinates.

Definition at line 69 of file SnapVertex.h.

Referenced by add(), clear(), and search().

std::size_t te::edit::Snap::m_maxGeometries
protectedinherited

The maximum number of geometries that can be added to the snap. If 0, there will be not limit.

Definition at line 112 of file Snap.h.

Referenced by add(), and te::edit::Snap::getMaxGeometries().

std::size_t te::edit::Snap::m_nGeometries
protectedinherited

The current number of geometries added to the snap.

Definition at line 111 of file Snap.h.

Referenced by add(), clear(), and te::edit::Snap::getNGeometries().

te::sam::rtree::Index<std::size_t, 8> te::edit::SnapVertex::m_rtree
private

Internal index used to retrieve geometries spatially.

Definition at line 70 of file SnapVertex.h.

Referenced by add(), clear(), and search().

std::string te::edit::Snap::m_source
protectedinherited

The source of the geometries.

Definition at line 109 of file Snap.h.

Referenced by te::edit::Snap::getSource().

int te::edit::Snap::m_srid
protectedinherited

The SRS of the geometries.

Definition at line 110 of file Snap.h.

Referenced by te::edit::Snap::getSRID().

double te::edit::Snap::m_tolerance
protectedinherited

The tolerance that will be used by the snap. For while, the unit is screen pixels.

Definition at line 113 of file Snap.h.

Referenced by te::edit::Snap::getSearchEnvelope(), te::edit::Snap::getTolerance(), and te::edit::Snap::setTolerance().

te::map::WorldDeviceTransformer* te::edit::Snap::m_transformer
protectedinherited

For transforming from device coordinate to world coordinate and vice-versa.

Definition at line 114 of file Snap.h.

Referenced by te::edit::Snap::getSearchEnvelope(), te::edit::Snap::setWorld(), and te::edit::Snap::~Snap().


The documentation for this class was generated from the following files: