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 void
complete()
protected void
extractTransferInfrastructure(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 void
extractTransferInfrastructure(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 instancevoid
handle(de.topobyte.osm4j.core.model.iface.OsmNode osmNode)
Construct PLANit nodes/connectoids/transferzones from OSM nodes when relevantvoid
handle(de.topobyte.osm4j.core.model.iface.OsmRelation osmRelation)
void
handle(de.topobyte.osm4j.core.model.iface.OsmWay osmWay)
parse an osm way to extract for example platforms, or other transfer zone related geometryvoid
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, 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 PlanItException
extract 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 PlanItException
extract 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 PlanItException
Call this before we parse the OSM network to initialise the handler properly- Specified by:
initialiseBeforeParsing
in classOsmZoningHandlerBase
- Throws:
PlanItException
- thrown if error
-
handle
public void handle(de.topobyte.osm4j.core.model.iface.OsmNode osmNode) throws IOException
Construct PLANit nodes/connectoids/transferzones from OSM nodes when relevant- Specified by:
handle
in interfacede.topobyte.osm4j.core.access.OsmHandler
- Overrides:
handle
in 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 IOException
parse an osm way to extract for example platforms, or other transfer zone related geometry- Specified by:
handle
in interfacede.topobyte.osm4j.core.access.OsmHandler
- Overrides:
handle
in classde.topobyte.osm4j.core.access.DefaultOsmHandler
- Throws:
IOException
-
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
-
-