|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.referencing.wkt.Formattable
Base class for all object formattable as Well Known Text (WKT).
Constructor Summary | |
protected |
Formattable()
Default constructor. |
Method Summary | |
protected java.lang.String |
formatWKT(Formatter formatter)
Format the inner part of a Well Known Text (WKT) element. |
java.lang.String |
toString()
Returns a string representation for this object. |
java.lang.String |
toWKT()
Returns a Well Known Text (WKT) using a default indentation. |
java.lang.String |
toWKT(org.opengis.metadata.citation.Citation authority,
int indentation)
Returns a Well Known Text (WKT) for this object using the specified indentation and authority. |
java.lang.String |
toWKT(int indentation)
Returns a Well Known Text (WKT) for this object using the specified indentation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected Formattable()
Method Detail |
public java.lang.String toString()
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 coordinate
system objects. If this object is an instance of
DefaultCartesianCS
, then the WKT will
be formatted as "CartesianCS[AXIS["
..."], AXIS["
..."],
etc.]"
.
public java.lang.String toWKT() throws UnformattableObjectException
<preferred indentation>
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 engineering CRS with different unit for each axis), or because only some specific
implementations can be formatted as WKT.public java.lang.String toWKT(int indentation) throws UnformattableObjectException
indentation
- The amount of spaces to use in indentation for WKT formatting,
or 0 for formatting the whole WKT on a single line.
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 engineering CRS with different unit for each axis), or because only some specific
implementations can be formatted as WKT.public java.lang.String toWKT(org.opengis.metadata.citation.Citation authority, int indentation) throws UnformattableObjectException
authority
- The authority to prefer when choosing WKT entities names.indentation
- The amount of spaces to use in indentation for WKT formatting,
or 0 for formatting the whole WKT on a single line.
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 engineering CRS with different unit for each axis), or because only some specific
implementations can be formatted as WKT.protected java.lang.String formatWKT(Formatter formatter)
Formatter.append(Formattable)
. Element name and authority code must not be
formatted here. For example for a element
(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 declare that this object produces an invalid WKT. Subclasses must override this method for proper WKT formatting.
formatter
- The formatter to use.
toWKT()
,
toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |