27 #include "../common/Exception.h"
28 #include "../common/Translator.h"
29 #include "../dataaccess/dataset/DataSet.h"
30 #include "../dataaccess/utils/Utils.h"
31 #include "../datatype/Enums.h"
32 #include "../maptools/WorldDeviceTransformer.h"
72 return m_maxGeometries;
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::auto_ptr<te::gm::Geometry> g(dataset->
getGeometry(gpos));
122 return search(e, result);
127 if(m_transformer == 0)
135 m_transformer->world2Device(coord.
x, coord.
y, dx, dy);
138 te::gm::Envelope e(dx - m_tolerance, dy + m_tolerance, dx + m_tolerance, dy - m_tolerance);
141 m_transformer->device2World(e.
m_llx, e.
m_lly);
142 m_transformer->device2World(e.
m_urx, e.
m_ury);
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
Utility functions for the data access module.
double m_urx
Upper right corner x-coordinate.
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)
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)
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
virtual std::auto_ptr< te::gm::Geometry > getGeometry(std::size_t i) const =0
Method for retrieving a geometric attribute value.
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.
TEDATAACCESSEXPORT std::size_t GetFirstPropertyPos(const te::da::DataSet *dataset, int datatype)
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