Class OsmNetworkReaderData


  • public class OsmNetworkReaderData
    extends Object
    Data specifically required in the network reader while parsing OSM data
    Author:
    markr
    • Field Detail

      • BOUNDINGBOX_NEARNESS_DISTANCE_METERS

        public static final double BOUNDINGBOX_NEARNESS_DISTANCE_METERS
        the distance that qualifies as being near to the network bounding box. Used to suppress warnings of incomplete osm ways due to bounding box (which is to be expected). when beyond this distance, warnings of missing nodes/ways will be generated as something else is going on
        See Also:
        Constant Field Values
    • Constructor Detail

      • OsmNetworkReaderData

        public OsmNetworkReaderData()
    • Method Detail

      • reset

        public void reset()
        reset
      • updateBoundingBox

        public void updateBoundingBox​(de.topobyte.osm4j.core.model.iface.OsmNode osmNode)
        update bounding box to include osm node
        Parameters:
        osmNode - to expand so that bounding box includes it
      • getBoundingBox

        public org.locationtech.jts.geom.Envelope getBoundingBox()
        collect the network bounding box so far
        Returns:
        network bounding box
      • getOsmNodeData

        public OsmNodeData getOsmNodeData()
        Access to OSM node data
        Returns:
        OSM node data
      • getOsmCircularWays

        public Map<Long,​de.topobyte.osm4j.core.model.iface.OsmWay> getOsmCircularWays()
        collect the identified circular ways (unmodifiable)
        Returns:
        osm circular ways
      • addOsmCircularWay

        public void addOsmCircularWay​(de.topobyte.osm4j.core.model.iface.OsmWay osmWay)
        add a circular way
        Parameters:
        osmWay - to add
      • clearOsmCircularWays

        public void clearOsmCircularWays()
        remove all registered osm circular ways
      • registerProcessedOsmWayAsUnavailable

        public void registerProcessedOsmWayAsUnavailable​(long osmWayId)
        Register an OSM way as processed and identified as being unavailable. Any subsequent dependencies on this OSM way can be safely ignored without issuing further warnings
        Parameters:
        osmWayId - to register
      • isOsmWayProcessedAndUnavailable

        public boolean isOsmWayProcessedAndUnavailable​(long osmWayId)
        Verify if an OSM way is processed but identified as unavailable. Any subsequent dependencies on this OSM way can be safely ignored without issuing further warnings
        Parameters:
        osmWayId - to verify
        Returns:
        true when processed and unavailable, false otherwise
      • getLayerParser

        public final OsmNetworkLayerParser getLayerParser​(MacroscopicNetworkLayerImpl networkLayer)
        provide reference to a layer parser
        Parameters:
        networkLayer - to collect parser for
        Returns:
        layerParser, null if not present