Package org.planit.io.network.converter
Class PlanitNetworkWriterSettings
- java.lang.Object
-
- org.planit.io.network.converter.PlanitNetworkWriterSettings
-
public class PlanitNetworkWriterSettings extends Object
configurable settings for the PLANit network writer- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description protected Character
commaSeparator
tuple separator, default is CharacterUtils.COMMAprotected String
countryName
the countryprotected DecimalFormat
decimalFormat
number of decimals to use, default is Precision.DEFAULT_DECIMAL_FORMATprotected Character
decimalSeparator
decimal separator, default is CharacterUtils.DECIMAL_POINTprotected org.opengis.referencing.crs.CoordinateReferenceSystem
destinationCoordinateReferenceSystem
the coordinate reference system used for writing entities of this networkprotected Character
tupleSeparator
tuple separator, default is CharacterUtils.SPACE
-
Constructor Summary
Constructors Constructor Description PlanitNetworkWriterSettings()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Character
getCommaSeparator()
separator to use for separating x,y entries of a single coordinate that is being persistedString
getCountryName()
collect the country name setDecimalFormat
getDecimalFormat()
collect number of decimals used in writing coordinatesCharacter
getDecimalSeparator()
separator to use for separating decimals from unit changesorg.opengis.referencing.crs.CoordinateReferenceSystem
getDestinationCoordinateReferenceSystem()
collect the destination CrsCharacter
getTupleSeparator()
separator to use for tuples of coordinates that are being persistedvoid
logSettings()
Convenience method to log all the current settingsvoid
setCommaSeparator(Character commaSeparator)
set separatorvoid
setCountryName(String countryName)
set the country name to optimise projection if possiblevoid
setDecimalFormat(DecimalFormat decimalFormat)
set number of decimals used in writing coordinatesvoid
setDecimalSeparator(Character decimalSeparator)
set separatorvoid
setDestinationCoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem destinationCoordinateReferenceSystem)
Set the destination Crs to use (if not set, network's native Crs will be used, unless the user has specified a specific country for which we have a more appropriate Crs registered)void
setTupleSeparator(Character tupleSeparator)
set separator
-
-
-
Field Detail
-
decimalFormat
protected DecimalFormat decimalFormat
number of decimals to use, default is Precision.DEFAULT_DECIMAL_FORMAT
-
tupleSeparator
protected Character tupleSeparator
tuple separator, default is CharacterUtils.SPACE
-
commaSeparator
protected Character commaSeparator
tuple separator, default is CharacterUtils.COMMA
-
decimalSeparator
protected Character decimalSeparator
decimal separator, default is CharacterUtils.DECIMAL_POINT
-
destinationCoordinateReferenceSystem
protected org.opengis.referencing.crs.CoordinateReferenceSystem destinationCoordinateReferenceSystem
the coordinate reference system used for writing entities of this network
-
countryName
protected String countryName
the country
-
-
Method Detail
-
logSettings
public void logSettings()
Convenience method to log all the current settings
-
getDecimalFormat
public DecimalFormat getDecimalFormat()
collect number of decimals used in writing coordinates- Returns:
- number of decimals used
-
setDecimalFormat
public void setDecimalFormat(DecimalFormat decimalFormat)
set number of decimals used in writing coordinates- Parameters:
decimalFormat
- number of decimals
-
getTupleSeparator
public Character getTupleSeparator()
separator to use for tuples of coordinates that are being persisted- Returns:
- separator
-
setTupleSeparator
public void setTupleSeparator(Character tupleSeparator)
set separator- Parameters:
tupleSeparator
- to use
-
getCommaSeparator
public Character getCommaSeparator()
separator to use for separating x,y entries of a single coordinate that is being persisted- Returns:
- separator
-
setCommaSeparator
public void setCommaSeparator(Character commaSeparator)
set separator- Parameters:
commaSeparator
- to use
-
getDecimalSeparator
public Character getDecimalSeparator()
separator to use for separating decimals from unit changes- Returns:
- separator
-
setDecimalSeparator
public void setDecimalSeparator(Character decimalSeparator)
set separator- Parameters:
decimalSeparator
- to use
-
setCountryName
public void setCountryName(String countryName)
set the country name to optimise projection if possible- Parameters:
countryName
- to use
-
getCountryName
public String getCountryName()
collect the country name set- Returns:
- used country
-
getDestinationCoordinateReferenceSystem
public org.opengis.referencing.crs.CoordinateReferenceSystem getDestinationCoordinateReferenceSystem()
collect the destination Crs- Returns:
- destination Crs
-
setDestinationCoordinateReferenceSystem
public void setDestinationCoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem destinationCoordinateReferenceSystem)
Set the destination Crs to use (if not set, network's native Crs will be used, unless the user has specified a specific country for which we have a more appropriate Crs registered)- Parameters:
destinationCoordinateReferenceSystem
- to use
-
-