org.apache.sis.io.wkt

## Interface Parser

- 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)`
  Similar services are also available as convenience static methods:
  - `CRS​.fromWKT(String)`
  - `Envelopes​.fromWKT(CharSequence)`
  Non-fatal anomalies found in Well Known Texts are reported in a logger named `"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

  Defined in the `sis-metadata` module

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `createFromWKT(String text)` Creates the object from a string.

- - ### Method Detail

    - #### createFromWKT

          Object createFromWKT(String text)
                        throws FactoryException

      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"`.
      Tip: for processing warnings in a different way than logging them, one can use `CompoundFormat​.parseObject(String)` followed by a call to `WKTFormat​.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.

Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.