Class OsmIntermodalReader
- java.lang.Object
-
- org.goplanit.osm.converter.intermodal.OsmIntermodalReader
-
- All Implemented Interfaces:
ConverterEntity
,IntermodalReader<ServiceNetwork,RoutedServices>
,PairConverterReader<MacroscopicNetwork,Zoning>
public class OsmIntermodalReader extends Object implements IntermodalReader<ServiceNetwork,RoutedServices>
Parse OSM input in either *.osm or *.osm.pbf format and return PLANit intermodal network which includes the transfer zones of a zoning instance. By default an intermodal reader will activate parsing transfer infrastructure as well as the network infrastructure (including rail which for a "regular" network reader is turned off by default, since we assume that more often than not, once desires to include rail when parsing pt networks. One can manually change these defaults via the various settings made available.- Author:
- markr
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
OsmIntermodalReader(String countryName, PlanitOsmNetwork osmNetworkToPopulate, Zoning zoningToPopulate)
Constructorprotected
OsmIntermodalReader(URL inputSource, String countryName, PlanitOsmNetwork osmNetworkToPopulate, Zoning zoningToPopulate)
Constructorprotected
OsmIntermodalReader(OsmIntermodalReaderSettings settings, PlanitOsmNetwork osmNetworkToPopulate, Zoning zoningToPopulate)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OsmIntermodalReaderSettings
getSettings()
any settings to configure the reader can be configured by collecting these settingsPair<MacroscopicNetwork,Zoning>
read()
Parse a local *.osm or *.osm.pbf file and convert it into a Macroscopic network and zoning given the configuration options that have been setQuadruple<MacroscopicNetwork,Zoning,ServiceNetwork,RoutedServices>
readWithServices()
Currently no support yet for this featurevoid
reset()
reset the reader to allow for marking unnecessary resources for garbage collectionboolean
supportServiceConversion()
Currently no support for this yet on the OSM side.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.converter.intermodal.IntermodalReader
getTypeDescription
-
-
-
-
Constructor Detail
-
OsmIntermodalReader
protected OsmIntermodalReader(String countryName, PlanitOsmNetwork osmNetworkToPopulate, Zoning zoningToPopulate)
Constructor- Parameters:
countryName
- to use for parsing the geometries in desired projectionosmNetworkToPopulate
- to populatezoningToPopulate
- to populate
-
OsmIntermodalReader
protected OsmIntermodalReader(URL inputSource, String countryName, PlanitOsmNetwork osmNetworkToPopulate, Zoning zoningToPopulate)
Constructor- Parameters:
inputSource
- to use for all intermodal parsingcountryName
- to use for parsing the geometries in desired projectionosmNetworkToPopulate
- to populatezoningToPopulate
- to populate
-
OsmIntermodalReader
protected OsmIntermodalReader(OsmIntermodalReaderSettings settings, PlanitOsmNetwork osmNetworkToPopulate, Zoning zoningToPopulate)
Constructor- Parameters:
settings
- to usezoningToPopulate
- to populateosmNetworkToPopulate
- to populate
-
-
Method Detail
-
read
public Pair<MacroscopicNetwork,Zoning> read()
Parse a local *.osm or *.osm.pbf file and convert it into a Macroscopic network and zoning given the configuration options that have been set- Specified by:
read
in interfacePairConverterReader<MacroscopicNetwork,Zoning>
- Returns:
- network and zoning that has been parsed, or null if detected problem has occurred and logged
-
reset
public void reset()
reset the reader to allow for marking unnecessary resources for garbage collection- Specified by:
reset
in interfaceConverterEntity
-
getSettings
public OsmIntermodalReaderSettings getSettings()
any settings to configure the reader can be configured by collecting these settings- Specified by:
getSettings
in interfacePairConverterReader<MacroscopicNetwork,Zoning>
- Returns:
- the settings to configrue the reader
-
supportServiceConversion
public boolean supportServiceConversion()
Currently no support for this yet on the OSM side. To be implemented in the future. For now services are to be sourced from GTFS and spliced into the OSM network- Specified by:
supportServiceConversion
in interfaceIntermodalReader<ServiceNetwork,RoutedServices>
- Returns:
- false
-
readWithServices
public Quadruple<MacroscopicNetwork,Zoning,ServiceNetwork,RoutedServices> readWithServices()
Currently no support yet for this feature- Specified by:
readWithServices
in interfaceIntermodalReader<ServiceNetwork,RoutedServices>
- Returns:
- created network, zoning, service network and services
-
-