Class OsmZoningPreProcessingHandler

  • All Implemented Interfaces:
    de.topobyte.osm4j.core.access.OsmHandler

    public class OsmZoningPreProcessingHandler
    extends OsmZoningHandlerBase
    Handler that is applied before we conduct the actual handling of the zones by exploring the OSM relations in the file and highlighting a subset of ways that we are supposed to retain even though they are not tagged by themselves in a way that warrants keeping them. However, because they are vital to the OSM relations we should keep them. To avoid keeping all ways and nodes in memory, we preprocess by first identifying which nodes/ways we must keep to be able to properly parse the OSM relations (that are always parsed last).
    Author:
    markr
    • Constructor Detail

      • OsmZoningPreProcessingHandler

        public OsmZoningPreProcessingHandler​(OsmPublicTransportReaderSettings transferSettings,
                                             OsmZoningReaderData zoningReaderData,
                                             OsmZoningHandlerProfiler profiler)
        Constructor
        Parameters:
        transferSettings - for the handler
        zoningReaderData - to use for storage of temporary information, or data that is to be made available to later handlers
        profiler - to use
    • Method Detail

      • handle

        public void handle​(de.topobyte.osm4j.core.model.iface.OsmRelation osmRelation)
                    throws IOException
        Specified by:
        handle in interface de.topobyte.osm4j.core.access.OsmHandler
        Overrides:
        handle in class de.topobyte.osm4j.core.access.DefaultOsmHandler
        Throws:
        IOException
      • complete

        public void complete()
                      throws IOException
        Specified by:
        complete in interface de.topobyte.osm4j.core.access.OsmHandler
        Overrides:
        complete in class de.topobyte.osm4j.core.access.DefaultOsmHandler
        Throws:
        IOException
      • reset

        public void reset()
        reset the contents, mainly to free up unused resources
        Specified by:
        reset in class OsmZoningHandlerBase