Class OsmNetworkReaderData


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

      • osmNodes

        protected final Map<Long,​de.topobyte.osm4j.core.model.iface.OsmNode> osmNodes
        temporary storage of osmNodes before converting the useful ones to actual nodes
      • osmCircularWays

        protected final Map<Long,​de.topobyte.osm4j.core.model.iface.OsmWay> osmCircularWays
        temporary storage of osmWays before extracting either a single node, or multiple links to reflect the roundabout/circular road
      • 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()
        Default Constructor
    • 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
      • getOsmNodes

        public Map<Long,​de.topobyte.osm4j.core.model.iface.OsmNode> getOsmNodes()
        collect the osm nodes (unmoidifable)
        Returns:
        osm nodes
      • addOsmNode

        public void addOsmNode​(de.topobyte.osm4j.core.model.iface.OsmNode osmNode)
        add an osm node
        Parameters:
        osmNode - to add
      • getOsmNode

        public de.topobyte.osm4j.core.model.iface.OsmNode getOsmNode​(long osmNodeId)
        collect an osm node
        Parameters:
        osmNodeId - to collect
        Returns:
        osm node, null if not present
      • hasOsmNode

        public boolean hasOsmNode​(long osmNodeId)
        Verify if osm node is available
        Parameters:
        osmNodeId - to verify
        Returns:
        true when available, false otherwise
      • 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
      • 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