Class OsmZoningProcessingHandler
- java.lang.Object
-
- de.topobyte.osm4j.core.access.DefaultOsmHandler
-
- org.goplanit.osm.converter.zoning.handler.OsmZoningHandlerBase
-
- org.goplanit.osm.converter.zoning.handler.OsmZoningProcessingHandler
-
- All Implemented Interfaces:
de.topobyte.osm4j.core.access.OsmHandler
public class OsmZoningProcessingHandler extends OsmZoningHandlerBase
Handler that handles, i.e., converts, nodes, ways, and relations to the relevant transfer zones. This handler conducts the main processing pass whereas there also exist a pre- and post-processing handlers to initialise and finalise the parsing when the ordering of how OSM entities are parsed from file and offered to the handlers do not allow us to parse the OSM data in a single pass due to interdependencies.- Author:
- markr
-
-
Constructor Summary
Constructors Constructor Description OsmZoningProcessingHandler(OsmPublicTransportReaderSettings transferSettings, OsmZoningReaderData zoningReaderData, Zoning zoningToPopulate, OsmZoningHandlerProfiler profiler)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomplete()protected voidextractTransferInfrastructure(de.topobyte.osm4j.core.model.iface.OsmNode osmNode, OsmPtVersionScheme ptVersion, Map<String,String> tags)extract the transfer infrastructure which will contribute to newly created transfer zones on the zoning instanceprotected voidextractTransferInfrastructure(de.topobyte.osm4j.core.model.iface.OsmWay osmWay, OsmPtVersionScheme ptVersion, Map<String,String> tags)extract the transfer infrastructure which will contribute to newly created transfer zones on the zoning instancevoidhandle(de.topobyte.osm4j.core.model.iface.OsmNode osmNode)Construct PLANit nodes/connectoids/transferzones from OSM nodes when relevantvoidhandle(de.topobyte.osm4j.core.model.iface.OsmRelation osmRelation)voidhandle(de.topobyte.osm4j.core.model.iface.OsmWay osmWay)parse an osm way to extract for example platforms, or other transfer zone related geometryvoidinitialiseBeforeParsing()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
-
OsmZoningProcessingHandler
public OsmZoningProcessingHandler(OsmPublicTransportReaderSettings transferSettings, OsmZoningReaderData zoningReaderData, Zoning zoningToPopulate, OsmZoningHandlerProfiler profiler)
Constructor- Parameters:
transferSettings- for the handlerzoningReaderData- gather data during parsing and utilise available data from pre-processingzoningToPopulate- to populateprofiler- to use
-
-
Method Detail
-
extractTransferInfrastructure
protected void extractTransferInfrastructure(de.topobyte.osm4j.core.model.iface.OsmNode osmNode, OsmPtVersionScheme ptVersion, Map<String,String> tags) throws PlanItExceptionextract the transfer infrastructure which will contribute to newly created transfer zones on the zoning instance- Parameters:
osmNode- to parseptVersion- this node adheres totags- to use- Throws:
PlanItException- thrown if error
-
extractTransferInfrastructure
protected void extractTransferInfrastructure(de.topobyte.osm4j.core.model.iface.OsmWay osmWay, OsmPtVersionScheme ptVersion, Map<String,String> tags) throws PlanItExceptionextract the transfer infrastructure which will contribute to newly created transfer zones on the zoning instance- Parameters:
osmWay- to parseptVersion- this way adheres totags- to use- Throws:
PlanItException- thrown if error
-
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.OsmNode osmNode) throws IOExceptionConstruct PLANit nodes/connectoids/transferzones from OSM nodes when relevant- Specified by:
handlein interfacede.topobyte.osm4j.core.access.OsmHandler- Overrides:
handlein classde.topobyte.osm4j.core.access.DefaultOsmHandler- Parameters:
osmNode- node to parse- Throws:
IOException
-
handle
public void handle(de.topobyte.osm4j.core.model.iface.OsmWay osmWay) throws IOExceptionparse an osm way to extract for example platforms, or other transfer zone related geometry- Specified by:
handlein interfacede.topobyte.osm4j.core.access.OsmHandler- Overrides:
handlein classde.topobyte.osm4j.core.access.DefaultOsmHandler- Throws:
IOException
-
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
-
-