org.openstreetmap.josm.data.osm
Class MultipolygonCreate
java.lang.Object
org.openstreetmap.josm.data.osm.MultipolygonCreate
public class MultipolygonCreate
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
outerWays
public java.util.List<MultipolygonCreate.JoinedPolygon> outerWays
innerWays
public java.util.List<MultipolygonCreate.JoinedPolygon> innerWays
MultipolygonCreate
public MultipolygonCreate(java.util.List<MultipolygonCreate.JoinedPolygon> outerWays,
java.util.List<MultipolygonCreate.JoinedPolygon> innerWays)
MultipolygonCreate
public MultipolygonCreate()
makeFromWays
public java.lang.String makeFromWays(java.util.Collection<Way> ways)
- Splits ways into inner and outer JoinedWays. Sets innerWays and outerWays to the result.
TODO: Currently cannot process touching polygons. See code in JoinAreasAction.
- Returns:
- error description if the ways cannot be split. Null if all fine.
makeFromPolygons
private java.lang.String makeFromPolygons(java.util.List<MultipolygonCreate.JoinedPolygon> polygons)
- This method analyzes which ways are inner and which outer. Sets innerWays and outerWays to the result.
- Parameters:
joinedWays
-
- Returns:
- error description if the ways cannot be split. Null if all fine.
findOuterWaysRecursive
private java.util.List<MultipolygonCreate.PolygonLevel> findOuterWaysRecursive(int level,
java.util.Collection<MultipolygonCreate.JoinedPolygon> boundaryWays)
- Collects outer way and corresponding inner ways from all boundaries.
- Parameters:
boundaryWays
-
- Returns:
- the outermostWay, or null if intersection found.
JOSM