Package com.luciad.reference.format
Class TLcdWKTReferenceFormatter
java.lang.Object
com.luciad.reference.format.TLcdWKTReferenceFormatter
- All Implemented Interfaces:
ILcdModelReferenceFormatter
,ILcdXYWorldReferenceFormatter
public class TLcdWKTReferenceFormatter
extends Object
implements ILcdModelReferenceFormatter, ILcdXYWorldReferenceFormatter
Encodes geo references to OGC WKT strings as specified in OGC document 01-009 (OpenGIS® Coordinate
Transformation Service Implementation Specification).
- Since:
- 7.2
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a formatter to format geo references to Well Known Text format. -
Method Summary
Modifier and TypeMethodDescriptionformat
(ILcdGeoReference aGeoReference) Encodes the specified geo reference as an OGC WKT string.formatModelReference
(ILcdModelReference aModelReference) Encodes the given model reference as a WKT string.formatXYWorldReference
(ILcdXYWorldReference aXYWorldReference) Encodes the given XY world reference as a WKT string.
-
Constructor Details
-
TLcdWKTReferenceFormatter
public TLcdWKTReferenceFormatter()Constructs a formatter to format geo references to Well Known Text format.
-
-
Method Details
-
formatModelReference
public String formatModelReference(ILcdModelReference aModelReference) throws IllegalArgumentException, UnsupportedOperationException Encodes the given model reference as a WKT string.- Specified by:
formatModelReference
in interfaceILcdModelReferenceFormatter
- Parameters:
aModelReference
- the model reference to encode as a WKT String. It should implementILcdGeoReference
or extend fromTLcdCartesianReference
.- Returns:
- a WKT representation of the model reference.
- Throws:
IllegalArgumentException
- when the model reference passed is not anILcdGeoReference
orTLcdCartesianReference
.UnsupportedOperationException
- if the specified model reference cannot be encoded
-
formatXYWorldReference
public String formatXYWorldReference(ILcdXYWorldReference aXYWorldReference) throws IllegalArgumentException, UnsupportedOperationException Encodes the given XY world reference as a WKT string.- Specified by:
formatXYWorldReference
in interfaceILcdXYWorldReferenceFormatter
- Parameters:
aXYWorldReference
- the XY world reference to encode as a WKT String. It should implementILcdGeoReference
or extend fromTLcdCartesianReference
.- Returns:
- a WKT representation of the XY world reference.
- Throws:
IllegalArgumentException
- when the XY world reference passed is not anILcdGeoReference
orTLcdCartesianReference
.UnsupportedOperationException
- when the XY world reference cannot be encoded
-
format
public String format(ILcdGeoReference aGeoReference) throws NullPointerException, UnsupportedOperationException Encodes the specified geo reference as an OGC WKT string.- Parameters:
aGeoReference
- the geo reference to encode- Returns:
- a WKT string
- Throws:
NullPointerException
- if the given geo reference is nullUnsupportedOperationException
- if the specified geo reference cannot be encoded
-