Class OsmPublicTransportModeConversion
- java.lang.Object
-
- org.goplanit.osm.converter.OsmModeConversionBase
-
- org.goplanit.osm.converter.zoning.handler.helper.OsmPublicTransportModeConversion
-
public class OsmPublicTransportModeConversion extends OsmModeConversionBase
class that provides functionality to parse/filter public transport modes from OSM entities based on the user defined settings- Author:
- markr
-
-
Constructor Summary
Constructors Constructor Description OsmPublicTransportModeConversion(OsmNetworkReaderSettings networkSettings, OsmPublicTransportReaderSettings ptSettings, Iterable<Mode> layerModes)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Pair<Collection<String>,Collection<PredefinedModeType>>
collectModesFromPtEntity(long osmPtEntityId, Map<String,String> tags, String defaultMode)
collect the eligible modes both OSM and mapped PLANit modes for the given OSM entity representing pt infrastructure.Pair<SortedSet<String>,SortedSet<PredefinedModeType>>
collectPublicTransportModesFromPtEntity(long osmPtEntityId, de.topobyte.osm4j.core.model.iface.EntityType osmEntityType, Map<String,String> tags, String defaultMode)
collect the pt modes both OSM and mapped PLANit modes for a pt entity.Pair<SortedSet<String>,SortedSet<PredefinedModeType>>
collectPublicTransportModesFromPtEntity(de.topobyte.osm4j.core.model.iface.OsmEntity osmEntity, Map<String,String> tags, String defaultMode)
-
Methods inherited from class org.goplanit.osm.converter.OsmModeConversionBase
filterModeCompatibleLinks, getActivatedPlanitMode, getActivatedPlanitModes, getSettings, isLinkModeCompatible, isModeCompatible
-
-
-
-
Constructor Detail
-
OsmPublicTransportModeConversion
public OsmPublicTransportModeConversion(OsmNetworkReaderSettings networkSettings, OsmPublicTransportReaderSettings ptSettings, Iterable<Mode> layerModes)
Constructor- Parameters:
networkSettings
- to useptSettings
- to uselayerModes
- in use across the network we are populating
-
-
Method Detail
-
collectPublicTransportModesFromPtEntity
public Pair<SortedSet<String>,SortedSet<PredefinedModeType>> collectPublicTransportModesFromPtEntity(long osmPtEntityId, de.topobyte.osm4j.core.model.iface.EntityType osmEntityType, Map<String,String> tags, String defaultMode)
collect the pt modes both OSM and mapped PLANit modes for a pt entity. If no default mode is found based on the tags, a default mode may be provided explicitly by the user which will then be added to the OSM mode- Parameters:
osmPtEntityId
- to useosmEntityType
- of the id at handtags
- of the OSM entitydefaultMode
- to use- Returns:
- pair containing ordered eligible OSM modes identified and their mapped PLANit counterparts
-
collectPublicTransportModesFromPtEntity
public Pair<SortedSet<String>,SortedSet<PredefinedModeType>> collectPublicTransportModesFromPtEntity(de.topobyte.osm4j.core.model.iface.OsmEntity osmEntity, Map<String,String> tags, String defaultMode)
-
collectModesFromPtEntity
public Pair<Collection<String>,Collection<PredefinedModeType>> collectModesFromPtEntity(long osmPtEntityId, Map<String,String> tags, String defaultMode)
collect the eligible modes both OSM and mapped PLANit modes for the given OSM entity representing pt infrastructure. If no default mode is found based on the tags, a default mode may be provided explicitly by the user which will then be added to the OSM mode- Parameters:
osmPtEntityId
- to usetags
- of the OSM entitydefaultMode
- to use- Returns:
- pair containing eligible OSM modes identified and their mapped planit counterparts
-
-