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, OsmNetworkToZoningReaderData network2ZoningData, PlanitOsmNetwork referenceNetwork, Zoning zoningToPopulate, OsmZoningHandlerProfiler profiler)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
complete()
void
handle(de.topobyte.osm4j.core.model.iface.OsmRelation osmRelation)
void
initialiseBeforeParsing()
Call this BEFORE we parse the OSM network to initialise the handler properlyvoid
reset()
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, getReferenceNetwork, getSettings, getTransferZoneGroupHelper, getTransferZoneHelper, getZoning, getZoningReaderData, hasNetworkLayersWithActiveOsmNode, isActivatedPublicTransportInfrastructure, isCoveredByZoningBoundingPolygon, isCoveredByZoningBoundingPolygon, isNearNetworkBoundingBox, logWarningIfNotNearBoundingBox, skipOsmNode, skipOsmPtEntity, skipOsmWay, wrapHandlePtOsmNode, wrapHandlePtOsmRelation, wrapHandlePtOsmWay
-
-
-
-
Constructor Detail
-
OsmZoningPostProcessingHandler
public OsmZoningPostProcessingHandler(OsmPublicTransportReaderSettings transferSettings, OsmZoningReaderData handlerData, OsmNetworkToZoningReaderData network2ZoningData, PlanitOsmNetwork referenceNetwork, Zoning zoningToPopulate, OsmZoningHandlerProfiler profiler)
Constructor- Parameters:
transferSettings
- for the handlerhandlerData
- the handler data gathered by preceding handlers for zoning parsingnetwork2ZoningData
- data transferred from parsing network to be used by zoning reader.referenceNetwork
- to usezoningToPopulate
- to populateprofiler
- to use
-
-
Method Detail
-
initialiseBeforeParsing
public void initialiseBeforeParsing()
Call this BEFORE we parse the OSM network to initialise the handler properly- Specified by:
initialiseBeforeParsing
in classOsmZoningHandlerBase
-
handle
public void handle(de.topobyte.osm4j.core.model.iface.OsmRelation osmRelation) throws IOException
- Specified by:
handle
in interfacede.topobyte.osm4j.core.access.OsmHandler
- Overrides:
handle
in classde.topobyte.osm4j.core.access.DefaultOsmHandler
- Throws:
IOException
-
complete
public void complete() throws IOException
- Specified by:
complete
in interfacede.topobyte.osm4j.core.access.OsmHandler
- Overrides:
complete
in classde.topobyte.osm4j.core.access.DefaultOsmHandler
- Throws:
IOException
-
reset
public void reset()
reset the contents, mainly to free up unused resources- Specified by:
reset
in classOsmZoningHandlerBase
-
-