Class OsmNetworkBaseHandler

  • All Implemented Interfaces:
    de.topobyte.osm4j.core.access.OsmHandler
    Direct Known Subclasses:
    OsmNetworkMainProcessingHandler, OsmNetworkPreProcessingHandler

    public abstract class OsmNetworkBaseHandler
    extends de.topobyte.osm4j.core.access.DefaultOsmHandler
    Base handler for networks with common functionality. Requires derived hanlder for concrete implementation.
    Author:
    markr
    • Method Detail

      • isActivatedRoadRailOrWaterwayBasedInfrastructure

        protected boolean isActivatedRoadRailOrWaterwayBasedInfrastructure​(Map<String,​String> tags)
        verify if tags represent an highway or railway that is specifically aimed at road based or rail based infrastructure, e.g., asphalt or tracks and NOT an area, platform, stops, etc. and is also activated for parsing based on the settings
        Parameters:
        tags - to verify
        Returns:
        true when activated and highway or railway (not an area), false otherwise
      • wrapHandleOsmWay

        protected void wrapHandleOsmWay​(de.topobyte.osm4j.core.model.iface.OsmWay osmWay,
                                        BiConsumer<de.topobyte.osm4j.core.model.iface.OsmWay,​Map<String,​String>> osmWayConsumer)
        Wrap the handling of OSM way by checking if it is eligible and catch any run time PLANit exceptions, if eligible delegate to consumer.
        Parameters:
        osmWay - to parse
        osmWayConsumer - to apply to eligible OSM way
      • reset

        public void reset()
        reset the contents, mainly to free up unused resources