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));
139 #endif // __TERRALIB_VP_INTERNAL_RTREEINDEX_H void insert(const te::gm::Envelope &envelope, const T &data)
Removes the given data considering the given envelope as key.
std::unique_ptr< te::vp::IndexReport< T > > search(const te::gm::Envelope &mbr) const
~RTreeIndex()
Clears the index.
void clear()
Inserts the given data considering the given envelope as key.
Utility classes, structures and definitions for Vector Processing.
This class makes easier and more generic the use of the te::sam::rtree::Index.
std::unique_ptr< te::vp::IndexReport< T > > getData() const
Searches from all data consdering the given mbr.
IndexContainer< T > m_indexContainer
The indexed data container.
void remove(const te::gm::Envelope &envelope, std::size_t dataIndex)
Gets all data from the RTreeIndex.
te::sam::rtree::Index< std::size_t > m_index
The internal rtree to store the data indexes.
An Envelope defines a 2D rectangular region.
Configuration flags for the Terrralib Vector Processing module.
RTreeIndex()
< Constructor