28 #ifndef __TERRALIB_VP_INTERNAL_RTREEINDEX_H
29 #define __TERRALIB_VP_INTERNAL_RTREEINDEX_H
34 #include "../common/STLUtils.h"
35 #include "../sam/rtree/Index.h"
74 std::unique_ptr<te::vp::IndexReport<T>>
getData()
const;
102 m_indexContainer.clear();
109 std::size_t newDataIndex = m_indexContainer.insert(data);
110 m_index.insert(envelope, newDataIndex);
116 m_index.remove(envelope, dataIndex);
117 m_indexContainer.remove(dataIndex);
123 std::vector<std::size_t> vecValidIndexes = m_indexContainer.getValidIndexes();
125 std::unique_ptr<te::vp::IndexReport<T>> indexReport(
new te::vp::IndexReport<T>(&m_indexContainer, vecValidIndexes));
132 std::vector<std::size_t> vecIndexesReport;
133 m_index.search(mbr, vecIndexesReport);
135 std::unique_ptr<te::vp::IndexReport<T>> indexReport(
new te::vp::IndexReport<T>(&m_indexContainer, vecIndexesReport));
An Envelope defines a 2D rectangular region.
This class makes easier and more generic the use of the te::sam::rtree::Index.
void insert(const te::gm::Envelope &envelope, const T &data)
Removes the given data considering the given envelope as key.
IndexContainer< T > m_indexContainer
The indexed data container.
std::unique_ptr< te::vp::IndexReport< T > > getData() const
Searches from all data consdering the given mbr.
std::unique_ptr< te::vp::IndexReport< T > > search(const te::gm::Envelope &mbr) const
~RTreeIndex()
Clears the index.
void remove(const te::gm::Envelope &envelope, std::size_t dataIndex)
Gets all data from the RTreeIndex.
RTreeIndex()
< Constructor
te::sam::rtree::Index< std::size_t > m_index
The internal rtree to store the data indexes.
void clear()
Inserts the given data considering the given envelope as key.
Proxy configuration file for TerraView (see terraview_config.h).
Utility classes, structures and definitions for Vector Processing.