public class RelationUtil extends Object
| Constructor and Description |
|---|
RelationUtil()
|
| Modifier and Type | Method and Description |
|---|---|
static List |
buildRings(MultiSet
Given a set of ways and their head's and tail's in the wayTailMap, construct valid rings by combining ways with same tail-ids.
|
static CountingMultiValMap |
buildWayTailMap(MultiSet
For all ways given, build a multivalmap from node-ids to ways.
|
static boolean |
checkRings(Collection
For each ring in this collection of rings, check whether it is closed.
|
static void |
closeUnclosedRingWithStraightLine(Collection
|
static List |
convertToSegmentRings(List
|
static List |
fixNodeIntersections(List
|
static Set |
gatherNodes(OsmWay
|
static Set |
gatherNodes(Set
|
static Set |
gatherRelations(OsmRelation
Given a relation find all referenced relations.
|
static Set |
gatherWays(OsmRelation
Gather all ways referenced by this relation.
|
static MultiSet |
gatherWays(Set
Gather all ways referenced by this set of relations.
|
static Set |
toLinearRings(Collection
|
public static Set<OsmRelation > gatherRelations(OsmRelation relation, OsmEntityProvider resolver)
public static MultiSet<OsmWay > gatherWays(Set <OsmRelation > relations, OsmEntityProvider resolver)
public static Set<OsmWay > gatherWays(OsmRelation relation, OsmEntityProvider resolver)
public static Set<OsmNode > gatherNodes(Set <OsmWay > ways, OsmEntityProvider resolver)
public static Set<OsmNode > gatherNodes(OsmWay way, OsmEntityProvider resolver)
public static List<WayRing > buildRings(MultiSet <OsmWay > ways, CountingMultiValMap <Long ,OsmWay > wayTailMap) throws EntityNotFoundException
EntityNotFoundException
public static CountingMultiValMap<Long ,OsmWay > buildWayTailMap(MultiSet <OsmWay > ways) throws EntityNotFoundException
EntityNotFoundException
public static boolean checkRings(Collection<WayRing > rings, OsmEntityProvider resolver) throws EntityNotFoundException
EntityNotFoundException
public static Set<LinearRing > toLinearRings(Collection <SegmentRing > rings, OsmEntityProvider resolver) throws EntityNotFoundException
EntityNotFoundException
public static List<SegmentRing > convertToSegmentRings(List <WayRing > rings)
public static List<SegmentRing > fixNodeIntersections(List <SegmentRing > rings)
public static void closeUnclosedRingWithStraightLine(Collection<WayRing > rings)