Package org.goplanit.osm.converter
Class OsmReaderSettings
- java.lang.Object
-
- org.goplanit.osm.converter.OsmReaderSettings
-
- All Implemented Interfaces:
ConverterReaderSettings
- Direct Known Subclasses:
OsmNetworkReaderSettings
,OsmPublicTransportReaderSettings
public abstract class OsmReaderSettings extends Object implements ConverterReaderSettings
Settings relevant for a Planit Xml reader- Author:
- markr
-
-
Constructor Summary
Constructors Constructor Description OsmReaderSettings()
Default constructor with default locale (Global)OsmReaderSettings(String countryName)
ConstructorOsmReaderSettings(URL inputSource, String countryName)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.locationtech.jts.geom.Polygon
getBoundingPolygon()
Set a polygon based bounding box to restrict parsing toString
getCountryName()
The country name used to initialise OSM defaults forURL
getInputSource()
The input source usedboolean
hasBoundingPolygon()
Set a polygon based bounding box to restrict parsing tovoid
setBoundingBox(Number x1, Number x2, Number y1, Number y2)
Set an additional (more restricting) 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(String inputSource)
Set the input source to use, we attempt to extract a URL from the String directly herevoid
setInputSource(URL inputSource)
Set the input source to use-
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.ConverterReaderSettings
reset
-
-
-
-
Constructor Detail
-
OsmReaderSettings
public OsmReaderSettings()
Default constructor with default locale (Global)
-
OsmReaderSettings
public OsmReaderSettings(String countryName)
Constructor- Parameters:
countryName
- to use
-
-
Method Detail
-
getInputSource
public final URL getInputSource()
The input source used- Returns:
- input source used
-
setInputSource
public void setInputSource(URL inputSource)
Set the input source to use- Parameters:
inputSource
- to use
-
setInputSource
public void setInputSource(String inputSource) throws PlanItException
Set the input source to use, we attempt to extract a URL from the String directly here- Parameters:
inputSource
- to use- Throws:
PlanItException
- thrown if error
-
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
-
getCountryName
public final String getCountryName()
The country name used to initialise OSM defaults for- Returns:
- country name
-
setBoundingBox
public final void setBoundingBox(Number x1, Number x2, Number y1, Number y2) throws PlanItException
Set an additional (more restricting) 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
-
getBoundingPolygon
public final org.locationtech.jts.geom.Polygon getBoundingPolygon()
Set a polygon based bounding box to restrict parsing to- Returns:
- boundingPolygon used, can be null
-
hasBoundingPolygon
public final boolean hasBoundingPolygon()
Set a polygon based bounding box to restrict parsing to- Returns:
- boundingPolygon used, can be null
-
-