27 #include <terralib_buildconfig.h> 39 std::vector<te::gm::Point*> pointVec;
42 pointVec.reserve(100);
44 for(
int i = 0; i < 100; ++i)
47 pointVec.push_back(pt);
51 for(
int i = 0; i < 100; ++i)
53 std::vector<std::size_t> report;
56 assert(rtree.
search(*mbr, report) == 1);
57 assert(report[0] == static_cast<std::size_t>(i));
This file contains include headers for TerraLib Spatial Access Methods module.
Several examples on how to use Spatial Access Methods in TerraLib.
A point with x and y coordinate values.
const Envelope * getMBR() const _NOEXCEPT_OP(true)
It returns the minimum bounding rectangle for the geometry in an internal representation.
An Envelope defines a 2D rectangular region.
int search(const te::gm::Envelope &mbr, std::vector< DATATYPE > &report) const
Range search query.
void IndexPointUsingRTree()
This example shows how to index a set of points using the R-tree spatial access method.
void insert(const te::gm::Envelope &mbr, const DATATYPE &data)
It inserts an item into the tree.
This file contains include headers for the TerraLib Common Runtime module.
This file contains include headers for the Vector Geometry model of TerraLib.
void FreeContents(boost::unordered_map< K, V * > &m)
This function can be applied to a map of pointers. It will delete each pointer in the map...