27 #include "../common/Exception.h" 28 #include "../core/translator/Translator.h" 29 #include "../dataaccess/dataset/DataSet.h" 30 #include "../dataaccess/utils/Utils.h" 31 #include "../datatype/Enums.h" 32 #include "../maptools/WorldDeviceTransformer.h" 46 m_transformer(nullptr)
86 const double& urx,
const double& ury,
87 const std::size_t& width,
const std::size_t& height)
108 if(gpos == std::string::npos)
113 std::unique_ptr<te::gm::Geometry> g(dataset->
getGeometry(gpos));
virtual std::unique_ptr< te::gm::Geometry > getGeometry(std::size_t i) const =0
Method for retrieving a geometric attribute value.
double getTolerance() const
void setWorld(const double &llx, const double &lly, const double &urx, const double &ury, const std::size_t &width, const std::size_t &height)
This class implements geometry snap concept.
std::size_t getMaxGeometries() const
static te::dt::Date dx(2010, 12, 31)
double m_urx
Upper right corner x-coordinate.
double m_tolerance
The tolerance that will be used by the snap. For while, the unit is screen pixels.
An utility struct for representing 2D coordinates.
#define TE_TR(message)
It marks a string in order to get translated.
std::string getSource() const
virtual bool moveNext()=0
It moves the internal pointer to the next item of the collection.
void add(te::da::DataSet *dataset)
std::size_t m_nGeometries
The current number of geometries added to the snap.
double m_llx
Lower left corner x-coordinate.
An Envelope defines a 2D rectangular region.
void setTolerance(const double &t)
void build(te::da::DataSet *dataset)
Utility functions for the data access module.
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
double m_lly
Lower left corner y-coordinate.
A dataset is the unit of information manipulated by the data access module of TerraLib.
virtual bool search(const te::gm::Coord2D &coord, te::gm::Coord2D &result)
double m_ury
Upper right corner y-coordinate.
std::string m_source
The source of the geometries.
TEDATAACCESSEXPORT std::size_t GetFirstPropertyPos(const te::da::DataSet *dataset, int datatype)
te::map::WorldDeviceTransformer * m_transformer
For transforming from device coordinate to world coordinate and vice-versa.
int m_srid
The SRS of the geometries.
bool isValid() const
It tells if the rectangle is valid or not.
te::gm::Envelope getSearchEnvelope(const te::gm::Coord2D &coord) const
Snap(const std::string &source, int srid=TE_UNKNOWN_SRS)
std::size_t getNGeometries() const
std::size_t m_maxGeometries
The maximum number of geometries that can be added to the snap. If 0, there will be not limit...