GEOS  3.9.1dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
geos::operation::overlayng::OverlayEdgeRing Class Reference

#include <OverlayEdgeRing.h>

Collaboration diagram for geos::operation::overlayng::OverlayEdgeRing:
[legend]

Public Member Functions

 OverlayEdgeRing (OverlayEdge *start, const GeometryFactory *geometryFactory)
 
std::unique_ptr< LinearRinggetRing ()
 
const LinearRinggetRingPtr () const
 
bool isHole () const
 
void setShell (OverlayEdgeRing *p_shell)
 
bool hasShell () const
 
const OverlayEdgeRinggetShell () const
 
void addHole (OverlayEdgeRing *ring)
 
bool isInRing (const Coordinate &pt)
 
const CoordinategetCoordinate ()
 
std::unique_ptr< PolygontoPolygon (const GeometryFactory *factory)
 
OverlayEdgegetEdge ()
 
OverlayEdgeRingfindEdgeRingContaining (std::vector< OverlayEdgeRing * > &erList)
 

Private Member Functions

void computeRingPts (OverlayEdge *start, CoordinateArraySequence &pts)
 
void computeRing (const CoordinateArraySequence &ringPts, const GeometryFactory *geometryFactory)
 
const CoordinateArraySequencegetCoordinates ()
 
PointOnGeometryLocatorgetLocator ()
 
void closeRing (CoordinateArraySequence &pts)
 

Private Attributes

OverlayEdgestartEdge
 
std::unique_ptr< LinearRingring
 
bool m_isHole
 
CoordinateArraySequence ringPts
 
std::unique_ptr< IndexedPointInAreaLocatorlocator
 
OverlayEdgeRingshell
 
std::vector< OverlayEdgeRing * > holes
 

Detailed Description

Definition at line 51 of file OverlayEdgeRing.h.

Constructor & Destructor Documentation

geos::operation::overlayng::OverlayEdgeRing::OverlayEdgeRing ( OverlayEdge start,
const GeometryFactory geometryFactory 
)

Member Function Documentation

void geos::operation::overlayng::OverlayEdgeRing::addHole ( OverlayEdgeRing ring)
void geos::operation::overlayng::OverlayEdgeRing::closeRing ( CoordinateArraySequence pts)
private
void geos::operation::overlayng::OverlayEdgeRing::computeRing ( const CoordinateArraySequence ringPts,
const GeometryFactory geometryFactory 
)
private
void geos::operation::overlayng::OverlayEdgeRing::computeRingPts ( OverlayEdge start,
CoordinateArraySequence pts 
)
private
OverlayEdgeRing* geos::operation::overlayng::OverlayEdgeRing::findEdgeRingContaining ( std::vector< OverlayEdgeRing * > &  erList)

Finds the innermost enclosing shell OverlayEdgeRing containing this OverlayEdgeRing, if any. The innermost enclosing ring is the smallest enclosing ring. The algorithm used depends on the fact that: ring A contains ring B iff envelope(ring A) contains envelope(ring B)

This routine is only safe to use if the chosen point of the hole is known to be properly contained in a shell (which is guaranteed to be the case if the hole does not touch its shell)

To improve performance of this function the caller should make the passed shellList as small as possible (e.g. by using a spatial index filter beforehand).

Returns
containing EdgeRing, if there is one or null if no containing EdgeRing is found
const Coordinate& geos::operation::overlayng::OverlayEdgeRing::getCoordinate ( )
const CoordinateArraySequence& geos::operation::overlayng::OverlayEdgeRing::getCoordinates ( )
private

Computes the list of coordinates which are contained in this ring. The coordinates are computed once only and cached.

Returns
an array of the Coordinates in this ring
OverlayEdge* geos::operation::overlayng::OverlayEdgeRing::getEdge ( )
PointOnGeometryLocator* geos::operation::overlayng::OverlayEdgeRing::getLocator ( )
private
std::unique_ptr<LinearRing> geos::operation::overlayng::OverlayEdgeRing::getRing ( )
const LinearRing* geos::operation::overlayng::OverlayEdgeRing::getRingPtr ( ) const
const OverlayEdgeRing* geos::operation::overlayng::OverlayEdgeRing::getShell ( ) const

Gets the shell for this ring. The shell is the ring itself if it is not a hole, otherwise its parent shell.

Returns
the shell for this ring
bool geos::operation::overlayng::OverlayEdgeRing::hasShell ( ) const

Tests whether this ring has a shell assigned to it.

Returns
true if the ring has a shell
bool geos::operation::overlayng::OverlayEdgeRing::isHole ( ) const

Tests whether this ring is a hole.

Returns
true if this ring is a hole
bool geos::operation::overlayng::OverlayEdgeRing::isInRing ( const Coordinate pt)
void geos::operation::overlayng::OverlayEdgeRing::setShell ( OverlayEdgeRing p_shell)

Sets the containing shell ring of a ring that has been determined to be a hole.

Parameters
shellthe shell ring
std::unique_ptr<Polygon> geos::operation::overlayng::OverlayEdgeRing::toPolygon ( const GeometryFactory factory)

Computes the Polygon formed by this ring and any contained holes.

Returns
the Polygon formed by this ring and its holes.

Member Data Documentation

std::vector<OverlayEdgeRing*> geos::operation::overlayng::OverlayEdgeRing::holes
private

Definition at line 63 of file OverlayEdgeRing.h.

std::unique_ptr<IndexedPointInAreaLocator> geos::operation::overlayng::OverlayEdgeRing::locator
private

Definition at line 60 of file OverlayEdgeRing.h.

bool geos::operation::overlayng::OverlayEdgeRing::m_isHole
private

Definition at line 58 of file OverlayEdgeRing.h.

std::unique_ptr<LinearRing> geos::operation::overlayng::OverlayEdgeRing::ring
private

Definition at line 57 of file OverlayEdgeRing.h.

CoordinateArraySequence geos::operation::overlayng::OverlayEdgeRing::ringPts
private

Definition at line 59 of file OverlayEdgeRing.h.

OverlayEdgeRing* geos::operation::overlayng::OverlayEdgeRing::shell
private

Definition at line 61 of file OverlayEdgeRing.h.

OverlayEdge* geos::operation::overlayng::OverlayEdgeRing::startEdge
private

Definition at line 56 of file OverlayEdgeRing.h.


The documentation for this class was generated from the following file: