Class OsmLaneTaggingSchemeHelper
- java.lang.Object
-
- org.goplanit.osm.converter.helper.OsmLaneTaggingSchemeHelper
-
- Direct Known Subclasses:
OsmLanesModeTaggingSchemeHelper
,OsmModeLanesTaggingSchemeHelper
public class OsmLaneTaggingSchemeHelper extends Object
The tagging scheme helper is the base class for different lane based tagging schemes. Currently there exist two different type of mode specific lane based tagging schemes namely a ModeLaneBased one and a LaneModeBased one. A good example and comparison of different schemes can be found for buses via https://wiki.openstreetmap.org/wiki/Bus_lanes- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<String>
eligibleOsmModes
track the osm modes that we are considering for the lanes:mode:*=* schemeprotected Set<String>
eligiblePublicServiceVehicleModes
track the public service vehicle modes that are eligible for this instanceprotected static Set<String>
publicServiceVehicleModes
track the modes that we support as part of public service vehicle (psv) lanes, currently only bus
-
Constructor Summary
Constructors Constructor Description OsmLaneTaggingSchemeHelper(Set<String> theEligibleOsmModes)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static Set<String>
getEligibleTaggingSchemeHelperModes(OsmNetworkReaderSettings settings, MacroscopicNetworkLayer networkLayer)
collect activated modes that are utilised via all derived tagging schemes.protected Set<String>
getMappedModesForAvailableKeys(Map<String,String> tags, Map<String,String> osmModeKeyMap)
Collect all the mapped OsmModes for keys that are found to be present in the passed in tags mapboolean
hasEligibleModes()
Verify if any eligible modes are presentprotected static boolean
requireTaggingSchemeHelper(OsmNetworkReaderSettings settings, MacroscopicNetworkLayer networkLayer)
Verify if any modes that can be identified via a currently derived tagging scheme are activated via the settings making it worthwhile to utilise the (derived) tagging scheme.
-
-
-
Field Detail
-
publicServiceVehicleModes
protected static final Set<String> publicServiceVehicleModes
track the modes that we support as part of public service vehicle (psv) lanes, currently only bus
-
eligibleOsmModes
protected final Set<String> eligibleOsmModes
track the osm modes that we are considering for the lanes:mode:*=* scheme
-
-
Method Detail
-
requireTaggingSchemeHelper
protected static boolean requireTaggingSchemeHelper(OsmNetworkReaderSettings settings, MacroscopicNetworkLayer networkLayer)
Verify if any modes that can be identified via a currently derived tagging scheme are activated via the settings making it worthwhile to utilise the (derived) tagging scheme. Currently we only consider:- bus (and therefore psv)
- bicycle
- hgv
- Parameters:
settings
- containing the activated and mapped Osm to PLANit modesnetworkLayer
- to identify subset of modes relevant for the layer at hand- Returns:
- yes, when these modes are activated, false otherwise
-
getEligibleTaggingSchemeHelperModes
protected static Set<String> getEligibleTaggingSchemeHelperModes(OsmNetworkReaderSettings settings, MacroscopicNetworkLayer networkLayer)
collect activated modes that are utilised via all derived tagging schemes. currently we only consider:- bus (and therefore psv)
- bicycle
- hgv
- Parameters:
settings
- to filter for activated modes onlynetworkLayer
- to identify subset of modes relevant for the layer at hand- Returns:
- list os OSM modes that would identify such modes
-
getMappedModesForAvailableKeys
protected Set<String> getMappedModesForAvailableKeys(Map<String,String> tags, Map<String,String> osmModeKeyMap)
Collect all the mapped OsmModes for keys that are found to be present in the passed in tags map- Parameters:
tags
- to useosmModeKeyMap
- to consider- Returns:
- osmModes for which the modeKeyMap is available (possibly extracted from road mode category when osmModeKeyMap contains a road mode category instead)
-
hasEligibleModes
public boolean hasEligibleModes()
Verify if any eligible modes are present- Returns:
- true when available, false otherwise
-
-