Class MinimalEdgeRing

 1  
 2  
 3 /*
 4  * Copyright (c) 2016 Vivid Solutions.
 5  *
 6  * All rights reserved. This program and the accompanying materials
 7  * are made available under the terms of the Eclipse Public License 2.0
 8  * and Eclipse Distribution License v. 1.0 which accompanies this distribution.
 9  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v20.html
10  * and the Eclipse Distribution License is available at
11  *
12  * http://www.eclipse.org/org/documents/edl-v10.php.
13  */
14 package org.locationtech.jts.operation.overlay;
15  
16 import org.locationtech.jts.geom.GeometryFactory;
17 import org.locationtech.jts.geomgraph.DirectedEdge;
18 import org.locationtech.jts.geomgraph.Edge;
19 import org.locationtech.jts.geomgraph.EdgeRing;
20  
21 /**
22  * A ring of {@link Edge}s with the property that no node
23  * has degree greater than 2.  These are the form of rings required
24  * to represent polygons under the OGC SFS spatial data model.
25  *
26  * @version 1.7
27  * @see org.locationtech.jts.operation.overlay.MaximalEdgeRing
28  */
29 public class MinimalEdgeRing
30   extends EdgeRing
31 {
32  
33   public MinimalEdgeRing(DirectedEdge start, GeometryFactory geometryFactory) {
34     super(start, geometryFactory);
35   }
36  
37   public DirectedEdge getNext(DirectedEdge de)
38   {
39     return de.getNextMin();
40   }
41   public void setEdgeRing(DirectedEdge de, EdgeRing er)
42   {
43     de.setMinEdgeRing(er);
44   }
45  
46 }
47