Class OsmNetworkPreProcessingHandler

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

    public class OsmNetworkPreProcessingHandler
    extends de.topobyte.osm4j.core.access.DefaultOsmHandler
    Preprocessing Handler that identifies which nodes of osm ways - that are marked for inclusion even if they fall (partially) outside the bounding polygon - are to be kept. Since we only know what nodes these are after parsing OSM ways (and nodes are parsed before the ways), this pre-processing is the only way that we can identify these nodes before the main parsing pass.
    Author:
    markr
    • Constructor Detail

      • OsmNetworkPreProcessingHandler

        public OsmNetworkPreProcessingHandler​(OsmNetworkReaderSettings settings)
        constructor
        Parameters:
        settings - for the handler
    • Method Detail

      • handle

        public void handle​(de.topobyte.osm4j.core.model.iface.OsmWay osmWay)
                    throws IOException
        for all OSM ways that are explicitly marked for inclusion despite falling outside the bounding polygon we extract their nodes and mark them for inclusion as exceptions to the bounding polygon filter that is applied during the main parsing pass in the regular PlanitOsmNetworkHandler
        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