Class OsmZoningPostProcessingHandler
- java.lang.Object
-
- de.topobyte.osm4j.core.access.DefaultOsmHandler
-
- org.goplanit.osm.converter.zoning.handler.OsmZoningHandlerBase
-
- org.goplanit.osm.converter.zoning.handler.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 Summary
Constructors Constructor Description OsmZoningPostProcessingHandler(OsmPublicTransportReaderSettings transferSettings, OsmZoningReaderData handlerData, Zoning zoningToPopulate, 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 parse the OSM network to initialise the handler properlyvoidreset()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
-
OsmZoningPostProcessingHandler
public OsmZoningPostProcessingHandler(OsmPublicTransportReaderSettings transferSettings, OsmZoningReaderData handlerData, Zoning zoningToPopulate, OsmZoningHandlerProfiler profiler)
Constructor- Parameters:
transferSettings- for the handlerhandlerData- the handler data gathered by preceding handlers for zoning parsingzoningToPopulate- to populateprofiler- to use
-
-
Method Detail
-
initialiseBeforeParsing
public void initialiseBeforeParsing() throws PlanItExceptionCall this BEFORE we parse the OSM network to initialise the handler properly- 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
-
-