Class OsmNetworkPreProcessingHandler
- java.lang.Object
-
- de.topobyte.osm4j.core.access.DefaultOsmHandler
-
- org.goplanit.osm.converter.network.OsmNetworkPreProcessingHandler
-
- All Implemented Interfaces:
de.topobyte.osm4j.core.access.OsmHandler
public class OsmNetworkPreProcessingHandler extends de.topobyte.osm4j.core.access.DefaultOsmHandlerPreprocessing 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 Summary
Constructors Constructor Description OsmNetworkPreProcessingHandler(OsmNetworkReaderSettings settings)constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomplete()voidhandle(de.topobyte.osm4j.core.model.iface.OsmWay osmWay)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 PlanitOsmNetworkHandlervoidreset()reset the contents, mainly to free up unused resources
-
-
-
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 IOExceptionfor 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:
handlein interfacede.topobyte.osm4j.core.access.OsmHandler- Overrides:
handlein classde.topobyte.osm4j.core.access.DefaultOsmHandler- Throws:
IOException
-
complete
public void complete() throws IOException- Specified by:
completein interfacede.topobyte.osm4j.core.access.OsmHandler- Overrides:
completein classde.topobyte.osm4j.core.access.DefaultOsmHandler- Throws:
IOException
-
reset
public void reset()
reset the contents, mainly to free up unused resources
-
-