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 doubleBOUNDINGBOX_NEARNESS_DISTANCE_METERSthe distance that qualifies as being near to the network bounding box.
-
Constructor Summary
Constructors Constructor Description OsmNetworkReaderData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddOsmCircularWay(de.topobyte.osm4j.core.model.iface.OsmWay osmWay)add a circular wayvoidclearOsmCircularWays()remove all registered osm circular waysorg.locationtech.jts.geom.EnvelopegetBoundingBox()collect the network bounding box so farOsmNetworkLayerParsergetLayerParser(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)OsmNodeDatagetOsmNodeData()Access to OSM node dataprotected voidinitialiseLayerParsers(PlanitOsmNetwork network, OsmNetworkReaderSettings settings, PlanitJtsCrsUtils geoUtils)initialise for each layerbooleanisOsmWayProcessedAndUnavailable(long osmWayId)Verify if an OSM way is processed but identified as unavailable.voidregisterProcessedOsmWayAsUnavailable(long osmWayId)Register an OSM way as processed and identified as being unavailable.voidreset()resetvoidupdateBoundingBox(de.topobyte.osm4j.core.model.iface.OsmNode osmNode)update bounding box to include osm node
-
-
-
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
-
-
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
-
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
-
getLayerParsers
public final Map<MacroscopicNetworkLayer,OsmNetworkLayerParser> getLayerParsers()
provide reference to the used layer parsers for each of the identified layers- Returns:
- layerParsers used
-
-