Class OsmNetworkReaderData
- java.lang.Object
-
- org.goplanit.osm.converter.network.OsmNetworkReaderData
-
public class OsmNetworkReaderData extends Object
Data specifically required in the network reader while parsing OSM data- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description static double
BOUNDINGBOX_NEARNESS_DISTANCE_METERS
the distance that qualifies as being near to the network bounding box.protected 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 roadprotected Map<Long,de.topobyte.osm4j.core.model.iface.OsmNode>
osmNodes
temporary storage of osmNodes before converting the useful ones to actual nodes
-
Constructor Summary
Constructors Constructor Description OsmNetworkReaderData()
Default Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOsmCircularWay(de.topobyte.osm4j.core.model.iface.OsmWay osmWay)
add a circular wayvoid
addOsmNode(de.topobyte.osm4j.core.model.iface.OsmNode osmNode)
add an osm nodevoid
clearOsmCircularWays()
remove all registered osm circular waysorg.locationtech.jts.geom.Envelope
getBoundingBox()
collect the network bounding box so farOsmNetworkLayerParser
getLayerParser(MacroscopicNetworkLayerImpl networkLayer)
provide reference to a layer parserMap<MacroscopicNetworkLayer,OsmNetworkLayerParser>
getLayerParsers()
provide reference to the used layer parsers for each of the identified layersMap<Long,de.topobyte.osm4j.core.model.iface.OsmWay>
getOsmCircularWays()
collect the identified circular ways (unmodifiable)de.topobyte.osm4j.core.model.iface.OsmNode
getOsmNode(long osmNodeId)
collect an osm nodeMap<Long,de.topobyte.osm4j.core.model.iface.OsmNode>
getOsmNodes()
collect the osm nodes (unmoidifable)boolean
hasOsmNode(long osmNodeId)
Verify if osm node is availableprotected void
initialiseLayerParsers(PlanitOsmNetwork network, OsmNetworkReaderSettings settings, PlanitJtsCrsUtils geoUtils)
initialise for each layervoid
reset()
resetvoid
updateBoundingBox(de.topobyte.osm4j.core.model.iface.OsmNode osmNode)
update bounding box to include osm node
-
-
-
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
-
-
Method Detail
-
initialiseLayerParsers
protected void initialiseLayerParsers(PlanitOsmNetwork network, OsmNetworkReaderSettings settings, PlanitJtsCrsUtils geoUtils)
initialise for each layer- Parameters:
network
- to usesettings
- to usegeoUtils
- to use
-
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
-
getLayerParsers
public final Map<MacroscopicNetworkLayer,OsmNetworkLayerParser> getLayerParsers()
provide reference to the used layer parsers for each of the identified layers- Returns:
- layerParsers used
-
-