Class 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
    • 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 use
        osmEntityType - of the id at hand
        tags - of the OSM entity
        defaultMode - to use
        Returns:
        pair containing ordered eligible OSM modes identified and their mapped PLANit counterparts
      • 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 use
        tags - of the OSM entity
        defaultMode - to use
        Returns:
        pair containing eligible OSM modes identified and their mapped planit counterparts