Class OsmZoningPostProcessingHandler

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

    public class OsmZoningPostProcessingHandler
    extends OsmZoningHandlerBase
    Handler that conducts final parsing round where all stop_positions in relations are mapped to the now parsed transfer zones. This is done separately because transfer zones are sometimes also part of relations and it is not guaranteed that all transfer zones are available when encountering a stop_position in a relation. So we parse them in another pass.

    Also, all unprocessed stations that are not part of any relation are converted into transfer zones and connectoids here since we can now guarantee they are not part of a relation, i.e., stop_area

    Author:
    markr
    • Constructor Detail

      • OsmZoningPostProcessingHandler

        public OsmZoningPostProcessingHandler​(OsmPublicTransportReaderSettings transferSettings,
                                              OsmZoningReaderData handlerData,
                                              Zoning zoningToPopulate,
                                              OsmZoningHandlerProfiler profiler)
        Constructor
        Parameters:
        transferSettings - for the handler
        handlerData - the handler data gathered by preceding handlers for zoning parsing
        zoningToPopulate - to populate
        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