Class CommonMethods


  • public final class CommonMethods
    extends java.lang.Object
    Hold 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.PolyLine buildOriginalOsmWayGeometry​(org.openstreetmap.atlas.geography.atlas.items.Edge edge)
      Build original (before Atlas sectioning) OSW way geometry from all Main Edges sections
      static long getOSMRelationMemberSize​(org.openstreetmap.atlas.geography.atlas.items.Relation relation)
      Return OSM Relation Members size excluding Atlas reversed and sectioned Edges
      static boolean isClosedWay​(org.openstreetmap.atlas.geography.atlas.items.Edge edge)
      Check if given Edge is part of Closed Way.
      static boolean isFirstWaySection​(org.openstreetmap.atlas.geography.atlas.items.Edge edge)
      Check if given Edge is a first section of the original OSM way.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 Main Edges 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 - Relation to 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 given Edge is part of Closed Way. OSM wiki: https://wiki.openstreetmap.org/wiki/Item:Q4669
        Parameters:
        edge - entity to check
        Returns:
        true if edge is part of closed way.
      • isFirstWaySection

        public static boolean isFirstWaySection​(org.openstreetmap.atlas.geography.atlas.items.Edge edge)
        Check if given Edge is 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:
        true if edge is first section