| org.geotools.referencing.wkt.AbstractParser org.geotools.referencing.wkt.MathTransformParser org.geotools.referencing.wkt.Parser
Field Summary | |
final protected CRSFactory | crsFactory The factory to use for creating
. | final protected CSFactory | csFactory The factory to use for creating
. | final protected DatumFactory | datumFactory The factory to use for creating
. |
Constructor Summary | |
public | Parser() Constructs a parser using the default set of symbols and factories. | public | Parser(Symbols symbols) Constructs a parser for the specified set of symbols using default factories. | public | Parser(Symbols symbols, ReferencingFactoryContainer factories) Constructs a parser for the specified set of symbols using the specified set of factories. | public | Parser(Symbols symbols, DatumFactory datumFactory, CSFactory csFactory, CRSFactory crsFactory, MathTransformFactory mtFactory) Constructs a parser for the specified set of symbols using the specified factories. |
Method Summary | |
protected Map | alterProperties(Map properties) Returns the properties to be given to the parsed object. | public static Class | getClassOf(String element) Returns the class of the specified WKT element. | public static String | getNameOf(Class type) Returns the WKT name of the specified object type. | public static void | main(String[] args) Read WKT strings from the
and
reformat them to the
. | protected Object | parse(Element element) Parses the next element in the specified Well Know Text (WKT) tree.
Parameters: element - The element to be parsed. | public CoordinateReferenceSystem | parseCoordinateReferenceSystem(String text) Parses a coordinate reference system element.
Parameters: text - The text to be parsed. |
crsFactory | final protected CRSFactory crsFactory(Code) | | The factory to use for creating
.
|
csFactory | final protected CSFactory csFactory(Code) | | The factory to use for creating
.
|
datumFactory | final protected DatumFactory datumFactory(Code) | | The factory to use for creating
.
|
Parser | public Parser()(Code) | | Constructs a parser using the default set of symbols and factories.
|
Parser | public Parser(Symbols symbols)(Code) | | Constructs a parser for the specified set of symbols using default factories.
Parameters: symbols - The symbols for parsing and formatting numbers. |
Parser | public Parser(Symbols symbols, ReferencingFactoryContainer factories)(Code) | | Constructs a parser for the specified set of symbols using the specified set of factories.
Parameters: symbols - The symbols for parsing and formatting numbers. Parameters: factories - The factories to use. |
Parser | public Parser(Symbols symbols, DatumFactory datumFactory, CSFactory csFactory, CRSFactory crsFactory, MathTransformFactory mtFactory)(Code) | | Constructs a parser for the specified set of symbols using the specified factories.
Parameters: symbols - The symbols for parsing and formatting numbers. Parameters: datumFactory - The factory to use for creating . Parameters: csFactory - The factory to use for creating . Parameters: crsFactory - The factory to use for creating . Parameters: mtFactory - The factory to use for creating objects. |
alterProperties | protected Map alterProperties(Map properties)(Code) | | Returns the properties to be given to the parsed object. This method is invoked
automatically by the parser for the
only.
This method expect on input the properties parsed from the
AUTHORITY element,
and returns on output the properties to give to the object to be created. The default
implementation returns the
properties map unchanged. Subclasses may override
this method in order to add or change properties.
Example: if a subclass want to add automatically an authority code when
no
AUTHORITY element was explicitly set in the WKT, then it may test for the
IdentifiedObject.IDENTIFIERS_KEY key and add automatically an entry if this
key was missing.
Parameters: properties - The properties parsed from the WKT file. Entries can be added, removedor modified directly in this map. The properties to be given to the parsed object. This is usually properties (maybe after modifications), but could also be a new map. since: 2.3 |
getClassOf | public static Class getClassOf(String element)(Code) | | Returns the class of the specified WKT element. For example this method returns
.class for element "
PROJCS ".
Parameters: element - The WKT element name. The GeoAPI class of the specified element, or null if unknow. |
getNameOf | public static String getNameOf(Class type)(Code) | | Returns the WKT name of the specified object type. For example this method returns
"
PROJCS " for type
.class .
Parameters: type - The GeoAPI class of the specified element. The WKT element name, or null if unknow. since: 2.4 |
main | public static void main(String[] args)(Code) | | Read WKT strings from the
and
reformat them to the
. The
input is read until it reach the end-of-file (
[Ctrl-Z] if
reading from the keyboard), or until an unparsable WKT has been hit.
Optional arguments are:
-authority <name> |
The authority to prefer when choosing WKT entities names. |
-indentation <value> |
Set the indentation (0 for output on a single line) |
-encoding <code> |
Set the character encoding |
-locale <language> |
Set the language for the output (e.g. "fr" for French) |
|
parse | protected Object parse(Element element) throws ParseException(Code) | | Parses the next element in the specified Well Know Text (WKT) tree.
Parameters: element - The element to be parsed. The object. throws: ParseException - if the element can't be parsed. switch |
parseCoordinateReferenceSystem | public CoordinateReferenceSystem parseCoordinateReferenceSystem(String text) throws ParseException(Code) | | Parses a coordinate reference system element.
Parameters: text - The text to be parsed. The coordinate reference system. throws: ParseException - if the string can't be parsed. |
Fields inherited from org.geotools.referencing.wkt.MathTransformParser | final protected MathTransformFactory mtFactory(Code)(Java Doc)
|
|
|