Class OsmLanesModeTaggingSchemeHelper
- java.lang.Object
-
- org.goplanit.osm.converter.helper.OsmLaneTaggingSchemeHelper
-
- org.goplanit.osm.converter.helper.OsmLanesModeTaggingSchemeHelper
-
public class OsmLanesModeTaggingSchemeHelper extends OsmLaneTaggingSchemeHelper
The lanesMode tagging scheme is one of a number of tagging schemes used by OSM to identify dedicated lanes for specific modes. It does not allow to identify which of the lanes belongs to a mode but it does allow one to identify how many lanes (and possibly in what direction) are dedicated to a mode. A good example and comparison of different schemes can be found for buses via https://wiki.openstreetmap.org/wiki/Bus_lanesMethods that help identify modes specified using the
lanes:<mode>:*=*
scheme. since this scheme applies across a number of modes it is useful to group the functionality in a separate class- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,String>
lanesModeBackwardKeyTags
lanes:<mode>:backward
tagsprotected Map<String,String>
lanesModeForwardKeyTags
lanes:<mode>:forward
tagsprotected Map<String,String>
lanesModeKeyTags
lanes:<mode>
tags-
Fields inherited from class org.goplanit.osm.converter.helper.OsmLaneTaggingSchemeHelper
eligibleOsmModes, eligiblePublicServiceVehicleModes, publicServiceVehicleModes
-
-
Constructor Summary
Constructors Constructor Description OsmLanesModeTaggingSchemeHelper(Set<String> theEligibleOsmModes)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Set<String>
getEligibleLanesModeSchemeHelperModes(OsmNetworkReaderSettings settings, MacroscopicNetworkLayer networkLayer)
collect activated modes that can be identified via thelanes:<mode>
tagging scheme are currently supported.Set<String>
getModesWithLanesInDirection(Map<String,String> tags, boolean isForwardDirection)
Collect the registered eligible OSM modes with lanes present without any further direction information via thelanes:<mode>
mode tagsSet<String>
getModesWithLanesWithoutDirection(Map<String,String> tags)
Collect the registered eligible OSM modes with lanes present without any further direction information via thelanes:<mode>
mode tagsstatic boolean
requireLanesModeSchemeHelper(OsmNetworkReaderSettings settings, MacroscopicNetworkLayer networkLayer)
Verify if any modes that can be identified via thelanes:<mode>
tagging scheme are currently activated via the settings making it worthwhile to utilise this tagging scheme.-
Methods inherited from class org.goplanit.osm.converter.helper.OsmLaneTaggingSchemeHelper
getEligibleTaggingSchemeHelperModes, getMappedModesForAvailableKeys, hasEligibleModes, requireTaggingSchemeHelper
-
-
-
-
Method Detail
-
requireLanesModeSchemeHelper
public static boolean requireLanesModeSchemeHelper(OsmNetworkReaderSettings settings, MacroscopicNetworkLayer networkLayer)
Verify if any modes that can be identified via thelanes:<mode>
tagging scheme are currently activated via the settings making it worthwhile to utilise this tagging scheme. Note that if the passed in layer does not support the activated PLANit mode the helper is not required either, since the layer will not support any of these modes. Currently we only consider:- bus (and therefore psv)
- bicycle
- hgv
- Parameters:
settings
- containing the activated and mapped OSM to PLANit modesnetworkLayer
- to identify supported modes on the layer, which is a subset of all mapped modes- Returns:
- yes, when these modes are activated, false otherwise
-
getEligibleLanesModeSchemeHelperModes
public static Set<String> getEligibleLanesModeSchemeHelperModes(OsmNetworkReaderSettings settings, MacroscopicNetworkLayer networkLayer)
collect activated modes that can be identified via thelanes:<mode>
tagging scheme are currently supported. currently we only consider:- bus (and therefore psv)
- bicycle
- hgv
- Parameters:
settings
- to filter for activated modes onlynetworkLayer
- to restrict the eligible modes based on the modes supported by the layer- Returns:
- list os OSM modes that would identify such modes
-
getModesWithLanesWithoutDirection
public Set<String> getModesWithLanesWithoutDirection(Map<String,String> tags)
Collect the registered eligible OSM modes with lanes present without any further direction information via thelanes:<mode>
mode tags- Parameters:
tags
- to use- Returns:
- modes found
-
getModesWithLanesInDirection
public Set<String> getModesWithLanesInDirection(Map<String,String> tags, boolean isForwardDirection)
Collect the registered eligible OSM modes with lanes present without any further direction information via thelanes:<mode>
mode tags- Parameters:
tags
- to useisForwardDirection
- when true explore only forward direction, when false only backward direction- Returns:
- modes with lanes in direction indicated
-
-