Class OsmInfrastructureConfiguration

    • Field Detail

      • activatedOsmTypes

        protected final Set<String> activatedOsmTypes
        the OSM types that are marked as supported OSM types, i.e., will be processed when parsing
      • deactivatedOsmTypes

        protected final Set<String> deactivatedOsmTypes
        the OSM types that are marked as deactivate OSM types, i.e., will be ignored when parsing unless activated. This differs from unactivatableOsmTypes because deactivatesOsmTypes can in fact be activated whereas unactivatableOsmTypes cannot
      • osmWayKey

        protected final String osmWayKey
        way key this configuration applies to
    • Constructor Detail

      • OsmInfrastructureConfiguration

        protected OsmInfrastructureConfiguration​(String osmWayKey)
        Default constructor
        Parameters:
        osmWayKey - to apply
      • OsmInfrastructureConfiguration

        public OsmInfrastructureConfiguration​(String osmWayKey,
                                              Set<String> activatedOsmTypes,
                                              Set<String> deactivatedOsmTypes)
        Construct with defaults being populated
        Parameters:
        osmWayKey - to apply
        activatedOsmTypes - to use
        deactivatedOsmTypes - to use
    • Method Detail

      • logDeactivatedTypes

        public void logDeactivatedTypes()
        Log all de-activated OSM way types
      • isDeactivated

        public boolean isDeactivated​(String osmWayValue)
        Verify if the passed in OSM way type is explicitly unsupported. Unsupported types will be ignored when processing ways.
        Parameters:
        osmWayValue - , e.g. primary, road
        Returns:
        true when unSupported, false if not (which means it is either supported, or not registered)
      • isActivated

        public boolean isActivated​(String osmWayValue)
        Verify if the passed in OSM way type is explicitly supported. Supported types will be processed and converted into link(segments).
        Parameters:
        osmWayValue - , e.g. primary
        Returns:
        true when supported, false if not (which means it is unsupported, or not registered)
      • deactivate

        public void deactivate​(String osmWayValue)
        Choose to not parse the given combination of way subtype, e.g. highway=road
        Parameters:
        osmWayValue - to use
      • activate

        public void activate​(String... osmWayValues)
        Choose to add a given way value to be on top of the defaults, e.g. highway=road
        Parameters:
        osmWayValues - to activate
      • activate

        public void activate​(List<String> osmWayValues)
        Choose to add a given way value to be on top of the defaults, e.g. highway=road
        Parameters:
        osmWayValues - to activate
      • setOfActivatedTypes

        public Set<String> setOfActivatedTypes()
        create a copy of the currently supported way types in set form
        Returns:
        set of supported highway types, any modifications on this set have no impact on the instance internals
      • setOfDeactivatedTypes

        public Set<String> setOfDeactivatedTypes()
        create a copy of the currently unsupported way types in set form
        Returns:
        set of supported highway types, any modifications on this set have no impact on the instance internals
      • deactivateAll

        public void deactivateAll()
        deactivate all types explicitly
      • activateAll

        public void activateAll()
        activate all types explicitly