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 voidclose()WritergetWriter()Get the writerStringtoString()voidwrite(Number number)Write a numbervoidwrite(AbridgedCoordinateTransformation transformation)Write an abridged coordinate transformationvoidwrite(Axis axis)Write an axis to well-known textvoidwrite(CoordinateSystem coordinateSystem)Write a coordinate system to well-known textvoidwrite(DatumEnsemble datumEnsemble)Write a datum ensemble to well-known textvoidwrite(DatumEnsembleMember datumEnsembleMember)Write a datum ensemble member to well-known textvoidwrite(Dynamic dynamic)Write a dynamic to well-known textvoidwrite(Extent extent)Write an extent to well-known textvoidwrite(GeographicBoundingBox geographicBoundingBox)Write a geographic bounding box to well-known textvoidwrite(Identifier identifier)Write an identifier to well-known textvoidwrite(ReferenceFrame referenceFrame)Write a reference frame to well-known textvoidwrite(TemporalExtent temporalExtent)Write a temporal extent to well-known textvoidwrite(Unit unit)Write a unit to well-known textvoidwrite(Usage usage)Write a usage to well-known textvoidwrite(VerticalExtent verticalExtent)Write a vertical extent to well-known textstatic Stringwrite(CRS crs)Write a coordinate reference system to well-known textvoidwrite(DerivingConversion derivingConversion)Write a deriving conversion to well-known textvoidwrite(Ellipsoid ellipsoid)Write an ellipsoid to well-known textvoidwrite(PrimeMeridian primeMeridian)Write a prime meridian to well-known textvoidwrite(OperationMethod method)Write an operation method to well-known textvoidwrite(OperationParameter parameter)Write an operation parameter to well-known textvoidwrite(MapProjection mapProjection)Write a map projection to well-known textvoidwrite(TemporalDatum temporalDatum)Write a temporal datum to well-known textvoidwrite(CRSKeyword keyword)Write a keywordvoidwriteAccuracy(double accuracy)Write an operation accuracyvoidwriteAccuracy(String accuracy)Write an operation accuracyvoidwriteAreaDescription(String areaDescription)Write an area description to well-known textvoidwriteBound(BoundCoordinateReferenceSystem crs)Write a bound CRS to well-known textvoidwriteCompound(CompoundCoordinateReferenceSystem crs)Write a compound CRS to well-known textvoidwriteConcatenatedOperation(ConcatenatedOperation operation)Write concatenated operation to well-known textvoidwriteCoordinateMetadata(CoordinateMetadata metadata)Write coordinate metadata to well-known textvoidwriteCoordinateOperation(CoordinateOperation operation)Write coordinate operation to well-known textvoidwriteCoordinateReferenceSystem(CRSKeyword keyword, CoordinateReferenceSystem crs)Write a coordinate reference system with the keywordvoidwriteCRS(CRS crs)Write a CRS to well-known textvoidwriteDerived(DerivedCoordinateReferenceSystem crs)Write a derived CRS to well-known textvoidwriteDerivedEngineeringCRS(DerivedCoordinateReferenceSystem crs)Write a derived engineering CRS to well-known textvoidwriteDerivedGeoCRS(DerivedCoordinateReferenceSystem crs)Write a derived geo CRS to well-known textvoidwriteDerivedParametricCRS(DerivedCoordinateReferenceSystem crs)Write a derived parametric CRS to well-known textvoidwriteDerivedProjectedCRS(DerivedCoordinateReferenceSystem crs)Write a derived projected CRS to well-known textvoidwriteDerivedTemporalCRS(DerivedCoordinateReferenceSystem crs)Write a derived temporal CRS to well-known textvoidwriteDerivedVerticalCRS(DerivedCoordinateReferenceSystem crs)Write a derived vertical CRS to well-known textvoidwriteEngineering(EngineeringCoordinateReferenceSystem crs)Write an engineering CRS to well-known textvoidwriteGeo(GeoCoordinateReferenceSystem crs)Write a geodetic or geographic CRS to well-known textvoidwriteIdentifiers(List<Identifier> identifiers)Write identifiers to well-known textvoidwriteInterpolation(CoordinateReferenceSystem crs)Write a interpolation coordinate reference systemvoidwriteKeywordDelimitedQuotedText(CRSKeyword keyword, String text)Write a keyword delimited textvoidwriteLeftDelimiter()Write a left delimitervoidwriteNumberOrQuotedText(String text)Write a number or quoted text if not a numbervoidwriteParameters(List<OperationParameter> parameters)Write operation parameters and operation parameter files to well-known textvoidwriteParametric(ParametricCoordinateReferenceSystem crs)Write a parametric CRS to well-known textvoidwritePointMotionOperation(PointMotionOperation operation)Write point motion operation to well-known textstatic StringwritePretty(String wkt)Write well-known text to well-known pretty text, 4 space indentsstatic StringwritePretty(String wkt, String indent)Write well-known text to well-known pretty textstatic StringwritePretty(String wkt, String newline, String indent)Write well-known text to well-known pretty textstatic StringwritePretty(CRS crs)Write a coordinate reference system to well-known pretty text, 4 space indentsstatic StringwritePretty(CRS crs, String indent)Write a coordinate reference system to well-known pretty textstatic StringwritePretty(CRS crs, String newline, String indent)Write a coordinate reference system to well-known pretty textstatic StringwritePrettyNoIndent(String wkt)Write well-known text to well-known pretty text, no indentsstatic StringwritePrettyNoIndent(CRS crs)Write a coordinate reference system to well-known pretty text, no indentsstatic StringwritePrettyTabIndent(String wkt)Write well-known text to well-known pretty text, tab indentsstatic StringwritePrettyTabIndent(CRS crs)Write a coordinate reference system to well-known pretty text, tab indentsvoidwriteProjected(ProjectedCoordinateReferenceSystem crs)Write a projected CRS to well-known textvoidwriteQuotedText(String text)Write the text as quotedvoidwriteRemark(String remark)Write a remark to well-known textvoidwriteRightDelimiter()Write a right delimitervoidwriteScope(String scope)Write a scope to well-known textvoidwriteScopeExtentIdentifierRemark(ScopeExtentIdentifierRemark object)Write the CRS usages (scope and extent), identifiers, and remarkvoidwriteSeparator()Write a separatorvoidwriteSource(CoordinateReferenceSystem crs)Write a source coordinate reference systemvoidwriteTarget(CoordinateReferenceSystem crs)Write a target coordinate reference systemvoidwriteTemporal(TemporalCoordinateReferenceSystem crs)Write a temporal CRS to well-known textvoidwriteUsages(List<Usage> usages)Write usages to well-known textvoidwriteVersion(String version)Write an operation versionvoidwriteVertical(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:
closein interfaceAutoCloseable- Specified by:
closein 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 IOExceptionWrite a left delimiter- Throws:
IOException- upon failure to write
-
writeRightDelimiter
public void writeRightDelimiter() throws IOExceptionWrite a right delimiter- Throws:
IOException- upon failure to write
-
writeSeparator
public void writeSeparator() throws IOExceptionWrite 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 IOExceptionWrite 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
-
-