Class OsmZoningPreProcessingHandler
- java.lang.Object
-
- de.topobyte.osm4j.core.access.DefaultOsmHandler
-
- org.goplanit.osm.converter.zoning.handler.OsmZoningHandlerBase
-
- org.goplanit.osm.converter.zoning.handler.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 Summary
Constructors Constructor Description OsmZoningPreProcessingHandler(OsmPublicTransportReaderSettings transferSettings, OsmZoningReaderData zoningReaderData, OsmZoningHandlerProfiler profiler)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomplete()voidhandle(de.topobyte.osm4j.core.model.iface.OsmRelation osmRelation)voidinitialiseBeforeParsing()Call this BEFORE we apply the handlervoidreset()reset the contents, mainly to free up unused resources-
Methods inherited from class org.goplanit.osm.converter.zoning.handler.OsmZoningHandlerBase
getConnectoidHelper, getGeoUtils, getNetworkToZoningData, getProfiler, getPtModeHelper, getSettings, getTransferZoneGroupHelper, getTransferZoneHelper, getZoning, getZoningReaderData, hasNetworkLayersWithActiveOsmNode, isActivatedPublicTransportInfrastructure, isCoveredByZoningBoundingPolygon, isCoveredByZoningBoundingPolygon, logWarningIfNotNearBoundingBox, skipOsmNode, skipOsmPtEntity, skipOsmWay
-
-
-
-
Constructor Detail
-
OsmZoningPreProcessingHandler
public OsmZoningPreProcessingHandler(OsmPublicTransportReaderSettings transferSettings, OsmZoningReaderData zoningReaderData, OsmZoningHandlerProfiler profiler)
Constructor- Parameters:
transferSettings- for the handlerzoningReaderData- to use for storage of temporary information, or data that is to be made available to later handlersprofiler- to use
-
-
Method Detail
-
initialiseBeforeParsing
public void initialiseBeforeParsing() throws PlanItExceptionCall this BEFORE we apply the handler- Specified by:
initialiseBeforeParsingin classOsmZoningHandlerBase- Throws:
PlanItException- thrown if error
-
handle
public void handle(de.topobyte.osm4j.core.model.iface.OsmRelation osmRelation) throws IOException- 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- Specified by:
resetin classOsmZoningHandlerBase
-
-