Algorithm to subdivide polygons based on a cell tilling and merge them back to their original format. More...
#include <PolygonSubdivider.h>
Public Types | |
using | ClusterIndexes = std::vector< std::size_t > |
using | Clusters = std::vector< ClusterIndexes > |
using | GeometryAssociation = std::pair< std::size_t, std::size_t > |
using | GeometryAssociations = std::vector< GeometryAssociation > |
using | SetIndexes = std::set< std::size_t > |
Static Public Member Functions | |
static GeometryAssociations | calculateGeometryAssociations (const std::vector< te::vp::SegmentInfo * > &vecBorderSegments, te::gm::Dimensionality dimensionality) |
Creates a non-normalized match map containing only the indexes of geometries that have a border relation to each other. This analysis is not recursive. | |
static GeometryAssociations | calculateGeometryAssociations (const te::gm::GeometryVector &vecFragments, const te::gm::LineString *splitLine) |
Creates a normalized match map containing only the indexes of geometries that have a border relation to each other. This analysis is recursive. | |
static Clusters | calculateGeometryClusters (const GeometryAssociations &geometryMatchMap) |
Normalizes an match map ensuring that all the list of indexes is complete, that is, the list will containg the indexes of all fragments that have borders with the key index. | |
static bool | checkForGeometrySubdivision (const te::gm::Envelope ¤tTile, const te::gm::Geometry *geometry, std::size_t geometryIndex, std::vector< te::vp::SegmentInfo * > &vecSegmentsInBorder) |
static te::gm::GeometryVector | dissolveFragments (const te::gm::GeometryVector &vecFragments, const Clusters &clusters) |
Dissolves all the geometries from the given fragments vector using the given match map as reference. | |
static bool | filterSegmentsInBorder (const te::gm::Geometry *geometry, std::size_t geometryIndex, const te::gm::LineString *splitLine, std::vector< te::vp::SegmentInfo * > &vecSegmentsInBorder) |
From the givem geometry, creates a list of all the segments that are exactly in the border of the given split reference line. It also returns the indexes of the geometries that doesnt overlap the given split reference line. | |
static std::vector< te::vp::SegmentInfo * > | filterSegmentsInBorder (const te::gm::GeometryVector &vecFragments, const te::gm::LineString *splitLine, std::vector< std::size_t > &vecIndexesNotInBorder) |
From the givem geometry vector, creates a list of all the segments that are exactly in the border of the given split reference line. It also returns the indexes of the geometries that doesnt overlap the given split reference line. | |
static SetIndexes | getUniqueIndexes (const GeometryAssociations &geometryAssociations) |
static te::gm::GeometryVector | merge (const te::gm::GeometryVector &vecFragments, const SubdividerTilling &tilling) |
Dissolves all the geometries from the given fragments vector that have borders with the given split reference line. | |
static te::gm::GeometryVector | merge (const te::gm::GeometryVector &vecFragments, const te::gm::LineString *splitLine) |
Dissolves all the geometries from the given fragments vector that have borders with the given split reference line. | |
static te::gm::GeometryVector | subdivide (const te::gm::Geometry *geometry, const SubdividerTilling &tilling, std::size_t maxCoordinates) |
Subdivides the given geometry using the given envelope. This has the same result as an intersection operation, but uses an optimized algorithm which considers an envelope. | |
static te::gm::GeometryVector | subdivide (const te::gm::Geometry *geometry, const te::gm::Envelope &envelope, std::size_t maxCoordinates) |
Subdivides the given geometry using the given envelope. This has the same result as an intersection operation, but uses an optimized algorithm which considers an envelope. | |
static te::gm::GeometryVector | subdivide (const te::gm::Geometry *geometry, std::size_t maxCoordinates) |
Subdivides the given geometry using the given envelope. This has the same result as an intersection operation, but uses an optimized algorithm which considers an envelope. | |
static te::gm::GeometryVector | subdivide (const te::gm::GeometryVector &vecInputGeometries, const SubdividerTilling &tilling, std::size_t maxCoordinates) |
Subdivides the given vecInputGeometries using the given envelope. This has the same result as an intersection operation, but uses an optimized algorithm which considers an envelope. | |
static te::gm::GeometryVector | subdivide (const te::gm::GeometryVector &vecInputGeometries, const te::gm::Envelope &envelope, std::size_t maxCoordinates) |
static te::gm::GeometryVector | subdivide (const te::gm::GeometryVector &vecInputGeometries, std::size_t maxCoordinates, std::vector< std::size_t > &vecParentIndexes) |
Subdivides the given vecInputGeometries using the given envelope. This has the same result as an intersection operation, but uses an optimized algorithm which considers an envelope. | |
Algorithm to subdivide polygons based on a cell tilling and merge them back to their original format.
Definition at line 61 of file PolygonSubdivider.h.
using te::vp::PolygonSubdivider::ClusterIndexes = std::vector<std::size_t> |
Definition at line 68 of file PolygonSubdivider.h.
using te::vp::PolygonSubdivider::Clusters = std::vector<ClusterIndexes> |
Definition at line 69 of file PolygonSubdivider.h.
using te::vp::PolygonSubdivider::GeometryAssociation = std::pair<std::size_t, std::size_t> |
Definition at line 66 of file PolygonSubdivider.h.
using te::vp::PolygonSubdivider::GeometryAssociations = std::vector<GeometryAssociation> |
Definition at line 67 of file PolygonSubdivider.h.
using te::vp::PolygonSubdivider::SetIndexes = std::set<std::size_t> |
Definition at line 65 of file PolygonSubdivider.h.
|
static |
Creates a non-normalized match map containing only the indexes of geometries that have a border relation to each other. This analysis is not recursive.
vecBorderSegments | The vector containing the border segments to be analysed |
|
static |
Creates a normalized match map containing only the indexes of geometries that have a border relation to each other. This analysis is recursive.
vecFragments | The vector containing the geometry fragments to be analysed |
splitLine | The referente split line where the geomtry fragments must be analysed |
|
static |
Normalizes an match map ensuring that all the list of indexes is complete, that is, the list will containg the indexes of all fragments that have borders with the key index.
geometryMatchMap | The match map to be normalized |
|
static |
|
static |
Dissolves all the geometries from the given fragments vector using the given match map as reference.
vecFragments | A vector containing all the candidate fragments to be dissolved |
geometryMatchMap | The match map to be be used as reference |
|
static |
From the givem geometry, creates a list of all the segments that are exactly in the border of the given split reference line. It also returns the indexes of the geometries that doesnt overlap the given split reference line.
geometry | The geometry to be analysed |
geometryIndex | The index of the geometry |
splitLine | The referente split line where the geomtry fragments must be analysed |
vecSegmentsInBorder | (Return parameter) A vector containing all the segments in the border of the given split reference line. f the vector is empty, the given geometry does not share borders with the given split line |
|
static |
From the givem geometry vector, creates a list of all the segments that are exactly in the border of the given split reference line. It also returns the indexes of the geometries that doesnt overlap the given split reference line.
vecFragments | The vector containing the geometry fragments to be analysed |
splitLine | The referente split line where the geomtry fragments must be analysed |
vecIndexesNotInBorder | (Return parameter) A return value containing the indexes of the geometries that doesnt overlap the given split reference line |
|
static |
|
static |
Dissolves all the geometries from the given fragments vector that have borders with the given split reference line.
vecFragments | A vector containing all the candidate fragments to be dissolved |
splitLine | The split reference line |
|
static |
Dissolves all the geometries from the given fragments vector that have borders with the given split reference line.
vecFragments | A vector containing all the candidate fragments to be dissolved |
splitLine | The split reference line |
|
static |
Subdivides the given geometry using the given envelope. This has the same result as an intersection operation, but uses an optimized algorithm which considers an envelope.
geometry | The input geometry to be clipped |
envelope | The envelope to be used as clipping area |
|
static |
Subdivides the given geometry using the given envelope. This has the same result as an intersection operation, but uses an optimized algorithm which considers an envelope.
geometry | The input geometry to be clipped |
envelope | The envelope to be used as clipping area |
|
static |
Subdivides the given geometry using the given envelope. This has the same result as an intersection operation, but uses an optimized algorithm which considers an envelope.
geometry | The input geometry to be clipped |
envelope | The envelope to be used as clipping area |
|
static |
Subdivides the given vecInputGeometries using the given envelope. This has the same result as an intersection operation, but uses an optimized algorithm which considers an envelope.
vecInputGeometries | The input geometries to be clipped |
envelope | The envelope to be used as clipping area |
|
static |
|
static |
Subdivides the given vecInputGeometries using the given envelope. This has the same result as an intersection operation, but uses an optimized algorithm which considers an envelope.
vecInputGeometries | The input geometries to be clipped |
envelope | The envelope to be used as clipping area |