- All Known Implementing Classes:
DefaultMathTransformFactory
,GeodeticObjectFactory
public interface Parser
A parser or a factory capable to create an object from a string in the WKT format.
The created objects may be Coordinate Reference Systems,
Math Transforms or geometric
objects for instance.
Parsing services may be provided by factories which implement this interface:
GeodeticObjectFactory.createFromWKT(String)
DefaultMathTransformFactory.createFromWKT(String)
"org.apache.sis.io.wkt"
. Warnings may be for unknown or unsupported WKT elements, inconsistent
unit definitions (unit symbol, scale factor or EPSG code), unparsable axis abbreviations, etc.
However, this parser does not verify if the overall parsed object matches the EPSG (or other authority) definition.
For such verification, see CRS.fromWKT(String)
.- Since:
- 0.6
-
Method Summary
-
Method Details
-
createFromWKT
Creates the object from a string. Objects returned by this method are typically (but not necessarily) Coordinate Reference Systems or Math Transforms. If the given text contains non-fatal anomalies, warnings may be reported in a logger named"org.apache.sis.io.wkt"
.Handling of warnings
For processing warnings in a different way than logging them, one can useCompoundFormat.parseObject(String)
followed by a call toWKTFormat.getWarnings()
.- Parameters:
text
- object encoded in Well-Known Text format (version 1 or 2).- Returns:
- the result of parsing the given text.
- Throws:
FactoryException
- if the object creation failed.
-