| java.lang.Object org.geotools.referencing.wkt.Formattable
All known Subclasses: org.geotools.referencing.datum.BursaWolfParameters, org.geotools.referencing.wkt.Adapter, org.geotools.referencing.operation.transform.AbstractMathTransform, org.geotools.parameter.AbstractParameter, org.geotools.referencing.AbstractIdentifiedObject,
Constructor Summary | |
protected | Formattable() Default constructor. |
Method Summary | |
protected String | formatWKT(Formatter formatter) Format the inner part of a
Well
Known Text (WKT) element. | static int | getIndentation() Returns the default indentation. | static void | setIndentation(int indentation) Set the default value for indentation. | public String | toString() Returns a string representation for this object. | public String | toWKT() Returns a
Well
Known Text (WKT) using a default indentation. | public String | toWKT(int indentation) Returns a
Well
Known Text (WKT) for this object using the specified indentation.
Parameters: indentation - The amount of spaces to use in indentation for WKT formatting,or 0 for formatting the whole WKT on a single line. | public String | toWKT(Citation authority, int indentation) Returns a
Well
Known Text (WKT) for this object using the specified indentation and authority.
Parameters: authority - The authority to prefer when choosing WKT entities names. Parameters: indentation - The amount of spaces to use in indentation for WKT formatting,or 0 for formatting the whole WKT on a single line. |
Formattable | protected Formattable()(Code) | | Default constructor.
|
formatWKT | protected String formatWKT(Formatter formatter)(Code) | | Format the inner part of a
Well
Known Text (WKT) element. This method is automatically invoked by
Formatter.append(Formattable) . Element name and authority code must not be
formatted here. For example for a
GEOGCS element
(
org.geotools.referencing.crs.DefaultGeographicCRS ), the formatter will invokes
this method for completing the WKT at the insertion point show below:
GEOGCS["WGS 84", AUTHORITY["EPSG","4326"]]
|
(insertion point)
The default implementation declares that this object produces an invalid WKT.
Subclasses must override this method for proper WKT formatting and should
not invoke
super.formatWKT(formatter) if they can
use a valid WKT syntax.
Parameters: formatter - The formatter to use. The name of the WKT element type (e.g. "GEOGCS" ). See Also: Formattable.toWKT See Also: Formattable.toString |
getIndentation | static int getIndentation()(Code) | | Returns the default indentation.
|
setIndentation | static void setIndentation(int indentation) throws SecurityException(Code) | | Set the default value for indentation.
throws: SecurityException - if a security manager is present andit denies RuntimePermission("preferences") . |
toString | public String toString()(Code) | | Returns a string representation for this object. The default implementation returns
the same string similar than
Formattable.toWKT() , except that no exception is thrown if
the string contains non-standard keywords. For example the
WKT
specification do not defines any keyword for
objects. If this object is an instance of
org.geotools.referencing.cs.DefaultCartesianCS , then the WKT will
be formatted as "CartesianCS[AXIS[" ..."], AXIS[" ..."],
etc.]" .
|
toWKT | public String toWKT() throws UnformattableObjectException(Code) | | Returns a
Well
Known Text (WKT) using a default indentation. The default indentation is read from
. It can be set from the command line using the
following syntax:
java org.geotools.referencing.wkt.Formattable -identation= <preferred
indentation>
The Well Know Text for this object. throws: UnformattableObjectException - If this object can't be formatted as WKT.A formatting may fails because an object is too complex for the WKT format capability(for example an with different unit for each axis), or because only some specificimplementations can be formatted as WKT. |
toWKT | public String toWKT(int indentation) throws UnformattableObjectException(Code) | | Returns a
Well
Known Text (WKT) for this object using the specified indentation.
Parameters: indentation - The amount of spaces to use in indentation for WKT formatting,or 0 for formatting the whole WKT on a single line. The Well Know Text for this object. throws: UnformattableObjectException - If this object can't be formatted as WKT.A formatting may fails because an object is too complex for the WKT format capability(for example an with different unit for each axis), or because only some specificimplementations can be formatted as WKT. |
toWKT | public String toWKT(Citation authority, int indentation) throws UnformattableObjectException(Code) | | Returns a
Well
Known Text (WKT) for this object using the specified indentation and authority.
Parameters: authority - The authority to prefer when choosing WKT entities names. Parameters: indentation - The amount of spaces to use in indentation for WKT formatting,or 0 for formatting the whole WKT on a single line. The Well Know Text for this object. throws: UnformattableObjectException - If this object can't be formatted as WKT.A formatting may fails because an object is too complex for the WKT format capability(for example an with different unit for each axis), or because only some specificimplementations can be formatted as WKT. |
|
|