28#ifndef __TERRALIB_VP_INTERNAL_KDTREEMULTIINDEX_H
29#define __TERRALIB_VP_INTERNAL_KDTREEMULTIINDEX_H
76 std::unique_ptr<te::vp::IndexReport<T>>
getData()
const;
113 m_index.insert(coord, newDataIndex);
125 std::vector<std::size_t> vecValidIndexes =
m_indexContainer.getValidIndexes();
134 std::vector<KD_NODE*> vecNodesReport;
135 m_index.search(mbr, vecNodesReport);
137 std::vector<std::size_t> vecFullIndexesReport;
138 for (std::size_t i = 0; i < vecNodesReport.size(); ++i)
140 const std::vector<std::size_t>& vecNodeIndexes = vecNodesReport.at(i)->getData();
141 vecFullIndexesReport.insert(vecFullIndexesReport.end(), vecNodeIndexes.begin(), vecNodeIndexes.end());
144 std::vector<std::size_t> vecNetIndexesReport =
m_indexContainer.getValidIndexes(vecFullIndexesReport);
mydialect insert("=", new te::da::BinaryOpEncoder("="))
This file contains several utility functions for dealing with STL containers.
An Envelope defines a 2D rectangular region.
A class that represents a two dimensional K-d Tree (2-d Tree).
A class that represents an Kd-tree node.
std::unique_ptr< te::vp::IndexReport< T > > getData() const
Searches from all data consdering the given mbr.
te::sam::kdtree::Index< KD_NODE > m_index
The internal rtree to store the data indexes.
void remove(const te::gm::Coord2D &coord, std::size_t dataIndex)
Gets all data from the KDTreeIndex.
IndexContainer< T > m_indexContainer
The indexed data container.
std::unique_ptr< te::vp::IndexReport< T > > search(const te::gm::Envelope &mbr) const
KDTreeMultiIndex()
< Constructor
void clear()
Inserts the given data considering the given envelope as key.
~KDTreeMultiIndex()
Clears the index.
te::sam::kdtree::Node< te::gm::Coord2D, std::size_t, std::vector< std::size_t >, te::sam::kdtree::kd_node_m_dataset_tag > KD_NODE
void insert(const te::gm::Coord2D &coord, const T &data)
Removes the given data considering the given envelope as key.
Namespace for the Vector Geometry module of TerraLib.
Namespace for Vector Processing module of TerraLib.
A class that represents a two dimensional K-d Tree (2-d Tree).
An utility struct for representing 2D coordinates.
Kd-Tree node type for nodes with multuple elements (used by template instantiation).
Configuration flags for the Terrralib Vector Processing module.
Utility classes, structures and definitions for Vector Processing.