Class CommonMethods
- java.lang.Object
-
- org.openstreetmap.atlas.checks.utility.CommonMethods
-
public final class CommonMethods extends java.lang.ObjectHold common Methods (should be used in more than one check)
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.openstreetmap.atlas.geography.PolyLinebuildOriginalOsmWayGeometry(org.openstreetmap.atlas.geography.atlas.items.Edge edge)Build original (before Atlas sectioning) OSW way geometry from all MainEdges sectionsstatic longgetOSMRelationMemberSize(org.openstreetmap.atlas.geography.atlas.items.Relation relation)Return OSM Relation Members size excluding Atlas reversed and sectioned Edgesstatic booleanisClosedWay(org.openstreetmap.atlas.geography.atlas.items.Edge edge)Check if givenEdgeis part of Closed Way.static booleanisFirstWaySection(org.openstreetmap.atlas.geography.atlas.items.Edge edge)Check if givenEdgeis a first section of the original OSM way.
-
-
-
Method Detail
-
buildOriginalOsmWayGeometry
public static org.openstreetmap.atlas.geography.PolyLine buildOriginalOsmWayGeometry(org.openstreetmap.atlas.geography.atlas.items.Edge edge)
Build original (before Atlas sectioning) OSW way geometry from all MainEdges sections- Parameters:
edge- entity to check- Returns:
- original Way geometry
PolyLine
-
getOSMRelationMemberSize
public static long getOSMRelationMemberSize(org.openstreetmap.atlas.geography.atlas.items.Relation relation)
Return OSM Relation Members size excluding Atlas reversed and sectioned Edges- Parameters:
relation-Relationto get the members of- Returns:
- A size of relations members as
Long
-
isClosedWay
public static boolean isClosedWay(org.openstreetmap.atlas.geography.atlas.items.Edge edge)
Check if givenEdgeis part of Closed Way. OSM wiki: https://wiki.openstreetmap.org/wiki/Item:Q4669- Parameters:
edge- entity to check- Returns:
trueif edge is part of closed way.
-
isFirstWaySection
public static boolean isFirstWaySection(org.openstreetmap.atlas.geography.atlas.items.Edge edge)
Check if givenEdgeis a first section of the original OSM way. This condition might help to improve performance if Check logic applies on entire OSM way.- Parameters:
edge- entity to check- Returns:
trueif edge is first section
-
-