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;
 
  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)
 
An Envelope defines a 2D rectangular region.
 
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
 
GeometryInfo(std::size_t geometryIndex, te::gm::Geometry *geometry)
Constructor.
 
std::vector< SegmentInfo > getAllSegments() const
Gets the geometry.
 
virtual ~GeometryInfo()
Searches the segments that interscepts the given filter.
 
void setGeometry(te::gm::Geometry *geometry)
 
std::size_t search(const te::gm::Envelope &filter, std::vector< SegmentInfo > &vecResult) const
Gets the list of all segments of the geometry.
 
void init(const te::gm::Envelope &filter)
< Initializes the index
 
GeometryInfoImpl * m_impl
A internal pointer to the implementation of the class. This is used to avoid exporting dependencies.
 
GeometryInfo(std::size_t geometryIndex, te::gm::Geometry *geometry, const te::gm::Envelope &filter)
Constructor.
 
const te::gm::Geometry * getGeometry() const
Sets the geometry. This will cause the old geometry to be deleted and the index to be recreated.
 
std::set< std::size_t > m_freeIndexes
Stores the list of removed indexes.
 
std::size_t insert(const T &data)
 
std::vector< std::size_t > getValidIndexes(const std::vector< std::size_t > &vecIndexes) const
 
std::vector< IndexData< T > * > m_vecData
The actual data stored.
 
te::vp::IndexData< T > * getData(std::size_t dataIndex) const
 
std::vector< std::size_t > getValidIndexes() const
 
void remove(std::size_t dataIndex)
 
IndexData(const T &data, std::size_t dataIndex)
 
T m_data
The templated data.
 
std::size_t m_dataIndex
The index of the data inside the data vector.
 
std::vector< T > getAllData() const
 
const IndexContainer< T > * m_indexContainer
 
te::vp::IndexData< T > * getData(std::size_t dataIndex) const
 
IndexReport(const IndexContainer< T > *indexContainer, const std::vector< std::size_t > &vecFilter)
 
std::vector< std::size_t > m_vecFilter
 
std::size_t m_geometryIndex
The segment envelope.
 
te::gm::Coord2D m_coord2
The segment start coordinate.
 
te::gm::Envelope m_envelope
The segment end coordinate.
 
const te::gm::Coord2D & getCoord1() const
Gets the segment end coordinate.
 
SegmentInfo(const te::gm::Coord2D &coord1, const te::gm::Coord2D &coord2, const te::gm::Envelope &envelope, std::size_t geometryIndex)
Constructor.
 
SegmentInfo * clone() const
Gets the segment start coordinate.
 
virtual ~SegmentInfo()
Clones the SegmentInfo.
 
const te::gm::Envelope & getEnvelope() const
Gets the geometry index.
 
std::size_t getGeometryIndex() const
Sets the geometry index.
 
const te::gm::Coord2D & getCoord2() const
Gets the segment envelope.
 
void setGeometryIndex(std::size_t geometryIndex)
 
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.
 
An utility struct for representing 2D coordinates.
 
#define TEVPEXPORT
You can use this macro in order to export/import classes and functions from this module.
 
Proxy configuration file for TerraView (see terraview_config.h).