Package mil.nga.crs.wkt
Class CRSWriter
- java.lang.Object
-
- mil.nga.crs.wkt.CRSWriter
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class CRSWriter extends Object implements Closeable
Well-Known Text writer- Author:
- osbornb
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Writer
getWriter()
Get the writerString
toString()
void
write(Number number)
Write a numbervoid
write(AbridgedCoordinateTransformation transformation)
Write an abridged coordinate transformationvoid
write(Axis axis)
Write an axis to well-known textvoid
write(CoordinateSystem coordinateSystem)
Write a coordinate system to well-known textvoid
write(DatumEnsemble datumEnsemble)
Write a datum ensemble to well-known textvoid
write(DatumEnsembleMember datumEnsembleMember)
Write a datum ensemble member to well-known textvoid
write(Dynamic dynamic)
Write a dynamic to well-known textvoid
write(Extent extent)
Write an extent to well-known textvoid
write(GeographicBoundingBox geographicBoundingBox)
Write a geographic bounding box to well-known textvoid
write(Identifier identifier)
Write an identifier to well-known textvoid
write(ReferenceFrame referenceFrame)
Write a reference frame to well-known textvoid
write(TemporalExtent temporalExtent)
Write a temporal extent to well-known textvoid
write(Unit unit)
Write a unit to well-known textvoid
write(Usage usage)
Write a usage to well-known textvoid
write(VerticalExtent verticalExtent)
Write a vertical extent to well-known textstatic String
write(CRS crs)
Write a coordinate reference system to well-known textvoid
write(DerivingConversion derivingConversion)
Write a deriving conversion to well-known textvoid
write(Ellipsoid ellipsoid)
Write an ellipsoid to well-known textvoid
write(PrimeMeridian primeMeridian)
Write a prime meridian to well-known textvoid
write(OperationMethod method)
Write an operation method to well-known textvoid
write(OperationParameter parameter)
Write an operation parameter to well-known textvoid
write(MapProjection mapProjection)
Write a map projection to well-known textvoid
write(TemporalDatum temporalDatum)
Write a temporal datum to well-known textvoid
write(CRSKeyword keyword)
Write a keywordvoid
writeAccuracy(double accuracy)
Write an operation accuracyvoid
writeAccuracy(String accuracy)
Write an operation accuracyvoid
writeAreaDescription(String areaDescription)
Write an area description to well-known textvoid
writeBound(BoundCoordinateReferenceSystem crs)
Write a bound CRS to well-known textvoid
writeCompound(CompoundCoordinateReferenceSystem crs)
Write a compound CRS to well-known textvoid
writeConcatenatedOperation(ConcatenatedOperation operation)
Write concatenated operation to well-known textvoid
writeCoordinateMetadata(CoordinateMetadata metadata)
Write coordinate metadata to well-known textvoid
writeCoordinateOperation(CoordinateOperation operation)
Write coordinate operation to well-known textvoid
writeCoordinateReferenceSystem(CRSKeyword keyword, CoordinateReferenceSystem crs)
Write a coordinate reference system with the keywordvoid
writeCRS(CRS crs)
Write a CRS to well-known textvoid
writeDerived(DerivedCoordinateReferenceSystem crs)
Write a derived CRS to well-known textvoid
writeDerivedEngineeringCRS(DerivedCoordinateReferenceSystem crs)
Write a derived engineering CRS to well-known textvoid
writeDerivedGeoCRS(DerivedCoordinateReferenceSystem crs)
Write a derived geo CRS to well-known textvoid
writeDerivedParametricCRS(DerivedCoordinateReferenceSystem crs)
Write a derived parametric CRS to well-known textvoid
writeDerivedProjectedCRS(DerivedCoordinateReferenceSystem crs)
Write a derived projected CRS to well-known textvoid
writeDerivedTemporalCRS(DerivedCoordinateReferenceSystem crs)
Write a derived temporal CRS to well-known textvoid
writeDerivedVerticalCRS(DerivedCoordinateReferenceSystem crs)
Write a derived vertical CRS to well-known textvoid
writeEngineering(EngineeringCoordinateReferenceSystem crs)
Write an engineering CRS to well-known textvoid
writeGeo(GeoCoordinateReferenceSystem crs)
Write a geodetic or geographic CRS to well-known textvoid
writeIdentifiers(List<Identifier> identifiers)
Write identifiers to well-known textvoid
writeInterpolation(CoordinateReferenceSystem crs)
Write a interpolation coordinate reference systemvoid
writeKeywordDelimitedQuotedText(CRSKeyword keyword, String text)
Write a keyword delimited textvoid
writeLeftDelimiter()
Write a left delimitervoid
writeNumberOrQuotedText(String text)
Write a number or quoted text if not a numbervoid
writeParameters(List<OperationParameter> parameters)
Write operation parameters and operation parameter files to well-known textvoid
writeParametric(ParametricCoordinateReferenceSystem crs)
Write a parametric CRS to well-known textvoid
writePointMotionOperation(PointMotionOperation operation)
Write point motion operation to well-known textstatic String
writePretty(String wkt)
Write well-known text to well-known pretty text, 4 space indentsstatic String
writePretty(String wkt, String indent)
Write well-known text to well-known pretty textstatic String
writePretty(String wkt, String newline, String indent)
Write well-known text to well-known pretty textstatic String
writePretty(CRS crs)
Write a coordinate reference system to well-known pretty text, 4 space indentsstatic String
writePretty(CRS crs, String indent)
Write a coordinate reference system to well-known pretty textstatic String
writePretty(CRS crs, String newline, String indent)
Write a coordinate reference system to well-known pretty textstatic String
writePrettyNoIndent(String wkt)
Write well-known text to well-known pretty text, no indentsstatic String
writePrettyNoIndent(CRS crs)
Write a coordinate reference system to well-known pretty text, no indentsstatic String
writePrettyTabIndent(String wkt)
Write well-known text to well-known pretty text, tab indentsstatic String
writePrettyTabIndent(CRS crs)
Write a coordinate reference system to well-known pretty text, tab indentsvoid
writeProjected(ProjectedCoordinateReferenceSystem crs)
Write a projected CRS to well-known textvoid
writeQuotedText(String text)
Write the text as quotedvoid
writeRemark(String remark)
Write a remark to well-known textvoid
writeRightDelimiter()
Write a right delimitervoid
writeScope(String scope)
Write a scope to well-known textvoid
writeScopeExtentIdentifierRemark(ScopeExtentIdentifierRemark object)
Write the CRS usages (scope and extent), identifiers, and remarkvoid
writeSeparator()
Write a separatorvoid
writeSource(CoordinateReferenceSystem crs)
Write a source coordinate reference systemvoid
writeTarget(CoordinateReferenceSystem crs)
Write a target coordinate reference systemvoid
writeTemporal(TemporalCoordinateReferenceSystem crs)
Write a temporal CRS to well-known textvoid
writeUsages(List<Usage> usages)
Write usages to well-known textvoid
writeVersion(String version)
Write an operation versionvoid
writeVertical(VerticalCoordinateReferenceSystem crs)
Write a vertical CRS to well-known text
-
-
-
Constructor Detail
-
CRSWriter
public CRSWriter()
Constructor
-
CRSWriter
public CRSWriter(Writer writer)
Constructor- Parameters:
writer
- writer
-
-
Method Detail
-
write
public static String write(CRS crs) throws IOException
Write a coordinate reference system to well-known text- Parameters:
crs
- coordinate reference system- Returns:
- well-known text
- Throws:
IOException
- upon failure to write
-
writePretty
public static String writePretty(CRS crs) throws IOException
Write a coordinate reference system to well-known pretty text, 4 space indents- Parameters:
crs
- coordinate reference system- Returns:
- well-known pretty text
- Throws:
IOException
- upon failure to write
-
writePrettyTabIndent
public static String writePrettyTabIndent(CRS crs) throws IOException
Write a coordinate reference system to well-known pretty text, tab indents- Parameters:
crs
- coordinate reference system- Returns:
- well-known pretty text
- Throws:
IOException
- upon failure to write
-
writePrettyNoIndent
public static String writePrettyNoIndent(CRS crs) throws IOException
Write a coordinate reference system to well-known pretty text, no indents- Parameters:
crs
- coordinate reference system- Returns:
- well-known pretty text
- Throws:
IOException
- upon failure to write
-
writePretty
public static String writePretty(CRS crs, String indent) throws IOException
Write a coordinate reference system to well-known pretty text- Parameters:
crs
- coordinate reference systemindent
- indent string- Returns:
- well-known pretty text
- Throws:
IOException
- upon failure to write
-
writePretty
public static String writePretty(CRS crs, String newline, String indent) throws IOException
Write a coordinate reference system to well-known pretty text- Parameters:
crs
- coordinate reference systemnewline
- newline stringindent
- indent string- Returns:
- well-known pretty text
- Throws:
IOException
- upon failure to write
-
writePretty
public static String writePretty(String wkt) throws IOException
Write well-known text to well-known pretty text, 4 space indents- Parameters:
wkt
- well-known text- Returns:
- well-known pretty text
- Throws:
IOException
- upon failure to write
-
writePrettyTabIndent
public static String writePrettyTabIndent(String wkt) throws IOException
Write well-known text to well-known pretty text, tab indents- Parameters:
wkt
- well-known text- Returns:
- well-known pretty text
- Throws:
IOException
- upon failure to write
-
writePrettyNoIndent
public static String writePrettyNoIndent(String wkt) throws IOException
Write well-known text to well-known pretty text, no indents- Parameters:
wkt
- well-known text- Returns:
- well-known pretty text
- Throws:
IOException
- upon failure to write
-
writePretty
public static String writePretty(String wkt, String indent) throws IOException
Write well-known text to well-known pretty text- Parameters:
wkt
- well-known textindent
- indent string- Returns:
- well-known pretty text
- Throws:
IOException
- upon failure to write
-
writePretty
public static String writePretty(String wkt, String newline, String indent) throws IOException
Write well-known text to well-known pretty text- Parameters:
wkt
- well-known textnewline
- newline stringindent
- indent string- Returns:
- well-known pretty text
- Throws:
IOException
- upon failure to write
-
getWriter
public Writer getWriter()
Get the writer- Returns:
- writer
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
writeCRS
public void writeCRS(CRS crs) throws IOException
Write a CRS to well-known text- Parameters:
crs
- coordinate reference system- Throws:
IOException
- upon failure to write
-
write
public void write(CRSKeyword keyword) throws IOException
Write a keyword- Parameters:
keyword
- keyword- Throws:
IOException
- upon failure to write
-
writeLeftDelimiter
public void writeLeftDelimiter() throws IOException
Write a left delimiter- Throws:
IOException
- upon failure to write
-
writeRightDelimiter
public void writeRightDelimiter() throws IOException
Write a right delimiter- Throws:
IOException
- upon failure to write
-
writeSeparator
public void writeSeparator() throws IOException
Write a separator- Throws:
IOException
- upon failure to write
-
writeQuotedText
public void writeQuotedText(String text) throws IOException
Write the text as quoted- Parameters:
text
- text- Throws:
IOException
- upon failure to write
-
write
public void write(Number number) throws IOException
Write a number- Parameters:
number
- number- Throws:
IOException
- upon failure to write
-
writeNumberOrQuotedText
public void writeNumberOrQuotedText(String text) throws IOException
Write a number or quoted text if not a number- Parameters:
text
- text- Throws:
IOException
- upon failure to write
-
writeKeywordDelimitedQuotedText
public void writeKeywordDelimitedQuotedText(CRSKeyword keyword, String text) throws IOException
Write a keyword delimited text- Parameters:
keyword
- keywordtext
- text- Throws:
IOException
- upon failure to write
-
writeGeo
public void writeGeo(GeoCoordinateReferenceSystem crs) throws IOException
Write a geodetic or geographic CRS to well-known text- Parameters:
crs
- geodetic or geographic coordinate reference system- Throws:
IOException
- upon failure to write
-
writeProjected
public void writeProjected(ProjectedCoordinateReferenceSystem crs) throws IOException
Write a projected CRS to well-known text- Parameters:
crs
- projected coordinate reference system- Throws:
IOException
- upon failure to write
-
writeVertical
public void writeVertical(VerticalCoordinateReferenceSystem crs) throws IOException
Write a vertical CRS to well-known text- Parameters:
crs
- vertical coordinate reference system- Throws:
IOException
- upon failure to write
-
writeEngineering
public void writeEngineering(EngineeringCoordinateReferenceSystem crs) throws IOException
Write an engineering CRS to well-known text- Parameters:
crs
- engineering coordinate reference system- Throws:
IOException
- upon failure to write
-
writeParametric
public void writeParametric(ParametricCoordinateReferenceSystem crs) throws IOException
Write a parametric CRS to well-known text- Parameters:
crs
- parametric coordinate reference system- Throws:
IOException
- upon failure to write
-
writeTemporal
public void writeTemporal(TemporalCoordinateReferenceSystem crs) throws IOException
Write a temporal CRS to well-known text- Parameters:
crs
- temporal coordinate reference system- Throws:
IOException
- upon failure to write
-
writeDerived
public void writeDerived(DerivedCoordinateReferenceSystem crs) throws IOException
Write a derived CRS to well-known text- Parameters:
crs
- temporal coordinate reference system- Throws:
IOException
- upon failure to write
-
writeDerivedGeoCRS
public void writeDerivedGeoCRS(DerivedCoordinateReferenceSystem crs) throws IOException
Write a derived geo CRS to well-known text- Parameters:
crs
- derived geo coordinate reference system- Throws:
IOException
- upon failure to write
-
writeDerivedProjectedCRS
public void writeDerivedProjectedCRS(DerivedCoordinateReferenceSystem crs) throws IOException
Write a derived projected CRS to well-known text- Parameters:
crs
- derived projected coordinate reference system- Throws:
IOException
- upon failure to write
-
writeDerivedVerticalCRS
public void writeDerivedVerticalCRS(DerivedCoordinateReferenceSystem crs) throws IOException
Write a derived vertical CRS to well-known text- Parameters:
crs
- derived vertical coordinate reference system- Throws:
IOException
- upon failure to write
-
writeDerivedEngineeringCRS
public void writeDerivedEngineeringCRS(DerivedCoordinateReferenceSystem crs) throws IOException
Write a derived engineering CRS to well-known text- Parameters:
crs
- derived engineering coordinate reference system- Throws:
IOException
- upon failure to write
-
writeDerivedParametricCRS
public void writeDerivedParametricCRS(DerivedCoordinateReferenceSystem crs) throws IOException
Write a derived parametric CRS to well-known text- Parameters:
crs
- derived parametric coordinate reference system- Throws:
IOException
- upon failure to write
-
writeDerivedTemporalCRS
public void writeDerivedTemporalCRS(DerivedCoordinateReferenceSystem crs) throws IOException
Write a derived temporal CRS to well-known text- Parameters:
crs
- derived temporal coordinate reference system- Throws:
IOException
- upon failure to write
-
writeCompound
public void writeCompound(CompoundCoordinateReferenceSystem crs) throws IOException
Write a compound CRS to well-known text- Parameters:
crs
- compound coordinate reference system- Throws:
IOException
- upon failure to write
-
writeCoordinateMetadata
public void writeCoordinateMetadata(CoordinateMetadata metadata) throws IOException
Write coordinate metadata to well-known text- Parameters:
metadata
- coordinate metadata- Throws:
IOException
- upon failure to write
-
writeCoordinateOperation
public void writeCoordinateOperation(CoordinateOperation operation) throws IOException
Write coordinate operation to well-known text- Parameters:
operation
- coordinate operation- Throws:
IOException
- upon failure to write
-
writePointMotionOperation
public void writePointMotionOperation(PointMotionOperation operation) throws IOException
Write point motion operation to well-known text- Parameters:
operation
- point motion operation- Throws:
IOException
- upon failure to write
-
writeConcatenatedOperation
public void writeConcatenatedOperation(ConcatenatedOperation operation) throws IOException
Write concatenated operation to well-known text- Parameters:
operation
- concatenated operation- Throws:
IOException
- upon failure to write
-
writeBound
public void writeBound(BoundCoordinateReferenceSystem crs) throws IOException
Write a bound CRS to well-known text- Parameters:
crs
- bound coordinate reference system- Throws:
IOException
- upon failure to write
-
writeScopeExtentIdentifierRemark
public void writeScopeExtentIdentifierRemark(ScopeExtentIdentifierRemark object) throws IOException
Write the CRS usages (scope and extent), identifiers, and remark- Parameters:
object
- scope extent identifier remark object- Throws:
IOException
- upon failure to write
-
write
public void write(ReferenceFrame referenceFrame) throws IOException
Write a reference frame to well-known text- Parameters:
referenceFrame
- reference frame- Throws:
IOException
- upon failure to write
-
write
public void write(DatumEnsemble datumEnsemble) throws IOException
Write a datum ensemble to well-known text- Parameters:
datumEnsemble
- datum ensemble- Throws:
IOException
- upon failure to write
-
write
public void write(DatumEnsembleMember datumEnsembleMember) throws IOException
Write a datum ensemble member to well-known text- Parameters:
datumEnsembleMember
- datum ensemble member- Throws:
IOException
- upon failure to write
-
write
public void write(Dynamic dynamic) throws IOException
Write a dynamic to well-known text- Parameters:
dynamic
- dynamic- Throws:
IOException
- upon failure to write
-
write
public void write(PrimeMeridian primeMeridian) throws IOException
Write a prime meridian to well-known text- Parameters:
primeMeridian
- prime meridian- Throws:
IOException
- upon failure to write
-
write
public void write(Ellipsoid ellipsoid) throws IOException
Write an ellipsoid to well-known text- Parameters:
ellipsoid
- ellipsoid- Throws:
IOException
- upon failure to write
-
write
public void write(Unit unit) throws IOException
Write a unit to well-known text- Parameters:
unit
- unit- Throws:
IOException
- upon failure to write
-
writeIdentifiers
public void writeIdentifiers(List<Identifier> identifiers) throws IOException
Write identifiers to well-known text- Parameters:
identifiers
- identifiers- Throws:
IOException
- upon failure to write
-
write
public void write(Identifier identifier) throws IOException
Write an identifier to well-known text- Parameters:
identifier
- identifier- Throws:
IOException
- upon failure to write
-
write
public void write(CoordinateSystem coordinateSystem) throws IOException
Write a coordinate system to well-known text- Parameters:
coordinateSystem
- coordinate system- Throws:
IOException
- upon failure to write
-
write
public void write(Axis axis) throws IOException
Write an axis to well-known text- Parameters:
axis
- axis- Throws:
IOException
- upon failure to write
-
writeRemark
public void writeRemark(String remark) throws IOException
Write a remark to well-known text- Parameters:
remark
- remark- Throws:
IOException
- upon failure to write
-
writeUsages
public void writeUsages(List<Usage> usages) throws IOException
Write usages to well-known text- Parameters:
usages
- usages- Throws:
IOException
- upon failure to write
-
write
public void write(Usage usage) throws IOException
Write a usage to well-known text- Parameters:
usage
- usage- Throws:
IOException
- upon failure to write
-
writeScope
public void writeScope(String scope) throws IOException
Write a scope to well-known text- Parameters:
scope
- scope- Throws:
IOException
- upon failure to write
-
write
public void write(Extent extent) throws IOException
Write an extent to well-known text- Parameters:
extent
- extent- Throws:
IOException
- upon failure to write
-
writeAreaDescription
public void writeAreaDescription(String areaDescription) throws IOException
Write an area description to well-known text- Parameters:
areaDescription
- area description- Throws:
IOException
- upon failure to write
-
write
public void write(GeographicBoundingBox geographicBoundingBox) throws IOException
Write a geographic bounding box to well-known text- Parameters:
geographicBoundingBox
- geographic bounding box- Throws:
IOException
- upon failure to write
-
write
public void write(VerticalExtent verticalExtent) throws IOException
Write a vertical extent to well-known text- Parameters:
verticalExtent
- vertical extent- Throws:
IOException
- upon failure to write
-
write
public void write(TemporalExtent temporalExtent) throws IOException
Write a temporal extent to well-known text- Parameters:
temporalExtent
- temporal extent- Throws:
IOException
- upon failure to write
-
write
public void write(MapProjection mapProjection) throws IOException
Write a map projection to well-known text- Parameters:
mapProjection
- map projection- Throws:
IOException
- upon failure to write
-
write
public void write(OperationMethod method) throws IOException
Write an operation method to well-known text- Parameters:
method
- operation method- Throws:
IOException
- upon failure to write
-
write
public void write(OperationParameter parameter) throws IOException
Write an operation parameter to well-known text- Parameters:
parameter
- operation parameter- Throws:
IOException
- upon failure to write
-
write
public void write(TemporalDatum temporalDatum) throws IOException
Write a temporal datum to well-known text- Parameters:
temporalDatum
- temporal datum- Throws:
IOException
- upon failure to write
-
write
public void write(DerivingConversion derivingConversion) throws IOException
Write a deriving conversion to well-known text- Parameters:
derivingConversion
- deriving conversion- Throws:
IOException
- upon failure to write
-
writeParameters
public void writeParameters(List<OperationParameter> parameters) throws IOException
Write operation parameters and operation parameter files to well-known text- Parameters:
parameters
- operation parameters- Throws:
IOException
- upon failure to write
-
writeVersion
public void writeVersion(String version) throws IOException
Write an operation version- Parameters:
version
- operation version- Throws:
IOException
- upon failure to write
-
writeSource
public void writeSource(CoordinateReferenceSystem crs) throws IOException
Write a source coordinate reference system- Parameters:
crs
- coordinate reference system- Throws:
IOException
- upon failure to write
-
writeTarget
public void writeTarget(CoordinateReferenceSystem crs) throws IOException
Write a target coordinate reference system- Parameters:
crs
- coordinate reference system- Throws:
IOException
- upon failure to write
-
writeInterpolation
public void writeInterpolation(CoordinateReferenceSystem crs) throws IOException
Write a interpolation coordinate reference system- Parameters:
crs
- coordinate reference system- Throws:
IOException
- upon failure to write
-
writeCoordinateReferenceSystem
public void writeCoordinateReferenceSystem(CRSKeyword keyword, CoordinateReferenceSystem crs) throws IOException
Write a coordinate reference system with the keyword- Parameters:
keyword
- CRS keywordcrs
- coordinate reference system- Throws:
IOException
- upon failure to write
-
writeAccuracy
public void writeAccuracy(double accuracy) throws IOException
Write an operation accuracy- Parameters:
accuracy
- operation accuracy- Throws:
IOException
- upon failure to write
-
writeAccuracy
public void writeAccuracy(String accuracy) throws IOException
Write an operation accuracy- Parameters:
accuracy
- operation accuracy- Throws:
IOException
- upon failure to write- Since:
- 1.1.0
-
write
public void write(AbridgedCoordinateTransformation transformation) throws IOException
Write an abridged coordinate transformation- Parameters:
transformation
- abridged coordinate transformation- Throws:
IOException
- upon failure to write
-
-