Class OsmIntermodalReaderSettings
- java.lang.Object
-
- org.goplanit.osm.converter.intermodal.OsmIntermodalReaderSettings
-
- All Implemented Interfaces:
ConverterReaderSettings
public class OsmIntermodalReaderSettings extends Object implements ConverterReaderSettings
Capture all the user configurable settings regarding the OSM intermodal reader, which in turn has a network and zoning reader. Hence these settings provide access to OSM network and zoning reader settings- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description protected OsmNetworkReaderSettings
networkSettings
the network settings to useprotected OsmPublicTransportReaderSettings
zoningPtSettings
the zoning PT settings to use
-
Constructor Summary
Constructors Constructor Description OsmIntermodalReaderSettings(String countryName)
ConstructorOsmIntermodalReaderSettings(String countryName, PlanitOsmNetwork networkToPopulate)
ConstructorOsmIntermodalReaderSettings(URL inputSource, String countryName, PlanitOsmNetwork networkToPopulate)
ConstructorOsmIntermodalReaderSettings(OsmNetworkReaderSettings networkSettings, OsmPublicTransportReaderSettings zoningPtSettings)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OsmNetworkReaderSettings
getNetworkSettings()
Provide access to the network reader settingsOsmPublicTransportReaderSettings
getPublicTransportSettings()
Provide access to the zoning (pt) reader settingsvoid
reset()
be able to reset all settings if neededvoid
setBoundingBox(Number x1, Number x2, Number y1, Number y2)
Set a square bounding box based on provided envelopevoid
setBoundingBox(org.locationtech.jts.geom.Envelope boundingBox)
Set a square bounding box based on provided envelope (which internally is converted to the bounding polygon that happens to be square)void
setBoundingPolygon(org.locationtech.jts.geom.Polygon boundingPolygon)
Set a polygon based bounding box to restrict parsing tovoid
setInputFile(String inputFile)
Set the input file to use, which is internally converted into a URLvoid
setInputSource(URL inputSource)
Set the inputSource to use including for both the network and public transport settings (both should use the same source)
-
-
-
Field Detail
-
networkSettings
protected final OsmNetworkReaderSettings networkSettings
the network settings to use
-
zoningPtSettings
protected final OsmPublicTransportReaderSettings zoningPtSettings
the zoning PT settings to use
-
-
Constructor Detail
-
OsmIntermodalReaderSettings
public OsmIntermodalReaderSettings(String countryName)
Constructor- Parameters:
countryName
- to use
-
OsmIntermodalReaderSettings
public OsmIntermodalReaderSettings(String countryName, PlanitOsmNetwork networkToPopulate)
Constructor- Parameters:
countryName
- to usenetworkToPopulate
- to use
-
OsmIntermodalReaderSettings
public OsmIntermodalReaderSettings(URL inputSource, String countryName, PlanitOsmNetwork networkToPopulate)
Constructor- Parameters:
inputSource
- to usecountryName
- to usenetworkToPopulate
- to use
-
OsmIntermodalReaderSettings
public OsmIntermodalReaderSettings(OsmNetworkReaderSettings networkSettings, OsmPublicTransportReaderSettings zoningPtSettings)
Constructor- Parameters:
networkSettings
- to usezoningPtSettings
- to use
-
-
Method Detail
-
reset
public void reset()
be able to reset all settings if needed- Specified by:
reset
in interfaceConverterReaderSettings
-
getNetworkSettings
public OsmNetworkReaderSettings getNetworkSettings()
Provide access to the network reader settings- Returns:
- network reader settings
-
getPublicTransportSettings
public OsmPublicTransportReaderSettings getPublicTransportSettings()
Provide access to the zoning (pt) reader settings- Returns:
- zoning reader pt settings
-
setInputSource
public void setInputSource(URL inputSource)
Set the inputSource to use including for both the network and public transport settings (both should use the same source)- Parameters:
inputSource
- to use
-
setInputFile
public void setInputFile(String inputFile) throws PlanItException
Set the input file to use, which is internally converted into a URL- Parameters:
inputFile
- to use- Throws:
PlanItException
- thrown if error
-
setBoundingBox
public final void setBoundingBox(Number x1, Number x2, Number y1, Number y2) throws PlanItException
Set a square bounding box based on provided envelope- Parameters:
x1
- , first x coordinatey1
- , first y coordinatex2
- , second x coordinatey2
- , second y coordinate- Throws:
PlanItException
- thrown if error
-
setBoundingBox
public final void setBoundingBox(org.locationtech.jts.geom.Envelope boundingBox)
Set a square bounding box based on provided envelope (which internally is converted to the bounding polygon that happens to be square)- Parameters:
boundingBox
- to use
-
setBoundingPolygon
public final void setBoundingPolygon(org.locationtech.jts.geom.Polygon boundingPolygon)
Set a polygon based bounding box to restrict parsing to- Parameters:
boundingPolygon
- to use
-
-