public class MultipolygonCreate extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
MultipolygonCreate.JoinedPolygon
Represents one polygon that consists of multiple ways.
|
(package private) static class |
MultipolygonCreate.PolygonLevel
Helper storage class for finding findOuterWays
|
| Modifier and Type | Field and Description |
|---|---|
List<MultipolygonCreate.JoinedPolygon> |
innerWays |
List<MultipolygonCreate.JoinedPolygon> |
outerWays |
| Constructor and Description |
|---|
MultipolygonCreate() |
MultipolygonCreate(List<MultipolygonCreate.JoinedPolygon> outerWays,
List<MultipolygonCreate.JoinedPolygon> innerWays) |
| Modifier and Type | Method and Description |
|---|---|
private List<MultipolygonCreate.PolygonLevel> |
findOuterWaysRecursive(int level,
Collection<MultipolygonCreate.JoinedPolygon> boundaryWays)
Collects outer way and corresponding inner ways from all boundaries.
|
private String |
makeFromPolygons(List<MultipolygonCreate.JoinedPolygon> polygons)
This method analyzes which ways are inner and which outer.
|
String |
makeFromWays(Collection<Way> ways)
Splits ways into inner and outer JoinedWays.
|
public List<MultipolygonCreate.JoinedPolygon> outerWays
public List<MultipolygonCreate.JoinedPolygon> innerWays
public MultipolygonCreate(List<MultipolygonCreate.JoinedPolygon> outerWays, List<MultipolygonCreate.JoinedPolygon> innerWays)
public MultipolygonCreate()
public String makeFromWays(Collection<Way> ways)
innerWays and outerWays to the result.
TODO: Currently cannot process touching polygons. See code in JoinAreasAction.ways - ways to analyzenull if all fine.private String makeFromPolygons(List<MultipolygonCreate.JoinedPolygon> polygons)
innerWays and outerWays to the result.polygons - polygons to analyzenull if all fine.private List<MultipolygonCreate.PolygonLevel> findOuterWaysRecursive(int level, Collection<MultipolygonCreate.JoinedPolygon> boundaryWays)
boundaryWays - null if intersection found.