26 #ifndef __TERRALIB_VP_INTERNAL_COMMONDATASTRCTURES_H 27 #define __TERRALIB_VP_INTERNAL_COMMONDATASTRCTURES_H 32 #include "../common/STLUtils.h" 33 #include "../geometry/Coord2D.h" 34 #include "../geometry/Envelope.h" 55 struct SegmentInfoImpl;
56 struct GeometryInfoImpl;
106 std::size_t position = 0;
127 void remove(std::size_t dataIndex)
142 std::vector<std::size_t> vecValidIndexes;
143 vecValidIndexes.reserve(
m_vecData.size());
145 for (std::size_t i = 0; i <
m_vecData.size(); ++i)
149 vecValidIndexes.push_back(i);
153 return vecValidIndexes;
156 std::vector<std::size_t>
getValidIndexes(
const std::vector<std::size_t>& vecIndexes)
const 163 std::vector<std::size_t> vecValidIndexes;
164 vecValidIndexes.reserve(vecIndexes.size());
168 for (std::size_t i = 0; i < vecIndexes.size(); ++i)
170 std::size_t index = vecIndexes.at(i);
175 vecValidIndexes.push_back(index);
180 return vecValidIndexes;
213 std::vector<T> vecAllData;
216 for (std::size_t i = 0; i <
m_vecFilter.size(); ++i)
260 std::size_t getGeometryIndex()
const;
263 void setGeometryIndex(std::size_t geometryIndex);
296 std::size_t search(
const te::gm::Envelope& filter, std::vector<SegmentInfo>& vecResult)
const;
299 std::vector<SegmentInfo> getAllSegments()
const;
318 #endif //__TERRALIB_VP_INTERNAL_COMMONDATASTRCTURES_H
#define TEVPEXPORT
You can use this macro in order to export/import classes and functions from this module.
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...
std::set< std::size_t > m_freeIndexes
Stores the list of removed indexes.
te::gm::Envelope m_envelope
The segment end coordinate.
te::gm::Coord2D m_coord2
The segment start coordinate.
An utility struct for representing 2D coordinates.
std::vector< std::size_t > m_vecFilter
GeometryInfoImpl * m_impl
A internal pointer to the implementation of the class. This is used to avoid exporting dependencies...
te::vp::IndexData< T > * getData(std::size_t dataIndex) const
std::size_t m_geometryIndex
The segment envelope.
te::vp::IndexData< T > * getData(std::size_t dataIndex) const
An Envelope defines a 2D rectangular region.
IndexData(const T &data, std::size_t dataIndex)
const IndexContainer< T > * m_indexContainer
IndexReport(const IndexContainer< T > *indexContainer, const std::vector< std::size_t > &vecFilter)
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
std::vector< T > getAllData() const
std::vector< std::size_t > getValidIndexes() const
std::vector< std::size_t > getValidIndexes(const std::vector< std::size_t > &vecIndexes) const
std::size_t insert(const T &data)
std::size_t m_dataIndex
The index of the data inside the data vector.
std::vector< IndexData< T > *> m_vecData
The actual data stored.
Configuration flags for the Terrralib Vector Processing module.
T m_data
The templated data.