org.geotools.geometry.iso.topograph2D
Class EdgeRing

java.lang.Object
  extended by org.geotools.geometry.iso.topograph2D.EdgeRing
Direct Known Subclasses:
MaximalEdgeRing, MinimalEdgeRing

public abstract class EdgeRing
extends java.lang.Object


Field Summary
protected  CGAlgorithms cga
           
protected  org.opengis.referencing.crs.CoordinateReferenceSystem crs
           
protected  DirectedEdge startDe
           
 
Constructor Summary
EdgeRing(DirectedEdge start, org.opengis.referencing.crs.CoordinateReferenceSystem crs, CGAlgorithms cga)
           
 
Method Summary
 void addHole(EdgeRing ring)
           
protected  void addPoints(Edge edge, boolean isForward, boolean isFirstEdge)
           
protected  void computePoints(DirectedEdge start)
          Collect all the points from the DirectedEdges of this ring into a contiguous list
 boolean containsPoint(Coordinate p)
          This method will cause the ring to be computed.
 Coordinate getCoordinate(int i)
           
 java.util.List getEdges()
          Returns the list of DirectedEdges that make up this EdgeRing
 Label getLabel()
           
 int getMaxNodeDegree()
           
abstract  DirectedEdge getNext(DirectedEdge de)
           
 org.opengis.geometry.primitive.Ring getRing()
           
 EdgeRing getShell()
           
 boolean isHole()
           
 boolean isIsolated()
           
 boolean isShell()
           
protected  void mergeLabel(Label deLabel)
           
protected  void mergeLabel(Label deLabel, int geomIndex)
          Merge the RHS label from a DirectedEdge into the label for this EdgeRing.
abstract  void setEdgeRing(DirectedEdge de, EdgeRing er)
           
 void setInResult()
           
 void setShell(EdgeRing shell)
           
 SurfaceImpl toPolygon()
          Creates a Surface based on the given ring and holes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

startDe

protected DirectedEdge startDe

crs

protected org.opengis.referencing.crs.CoordinateReferenceSystem crs

cga

protected CGAlgorithms cga
Constructor Detail

EdgeRing

public EdgeRing(DirectedEdge start,
                org.opengis.referencing.crs.CoordinateReferenceSystem crs,
                CGAlgorithms cga)
Method Detail

getNext

public abstract DirectedEdge getNext(DirectedEdge de)

setEdgeRing

public abstract void setEdgeRing(DirectedEdge de,
                                 EdgeRing er)

isIsolated

public boolean isIsolated()

isHole

public boolean isHole()

getCoordinate

public Coordinate getCoordinate(int i)

getRing

public org.opengis.geometry.primitive.Ring getRing()

getLabel

public Label getLabel()

isShell

public boolean isShell()

getShell

public EdgeRing getShell()

setShell

public void setShell(EdgeRing shell)

addHole

public void addHole(EdgeRing ring)

toPolygon

public SurfaceImpl toPolygon()
Creates a Surface based on the given ring and holes

Returns:
the created Surface

getEdges

public java.util.List getEdges()
Returns the list of DirectedEdges that make up this EdgeRing


computePoints

protected void computePoints(DirectedEdge start)
Collect all the points from the DirectedEdges of this ring into a contiguous list


getMaxNodeDegree

public int getMaxNodeDegree()

setInResult

public void setInResult()

mergeLabel

protected void mergeLabel(Label deLabel)

mergeLabel

protected void mergeLabel(Label deLabel,
                          int geomIndex)
Merge the RHS label from a DirectedEdge into the label for this EdgeRing. The DirectedEdge label may be null. This is acceptable - it results from a node which is NOT an intersection node between the Geometries (e.g. the end node of a LinearRing). In this case the DirectedEdge label does not contribute any information to the overall labelling, and is simply skipped.


addPoints

protected void addPoints(Edge edge,
                         boolean isForward,
                         boolean isFirstEdge)

containsPoint

public boolean containsPoint(Coordinate p)
This method will cause the ring to be computed. It will also check any holes, if they have been assigned.



Copyright © 1996-2010 Geotools. All Rights Reserved.