Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Update WKTParser to handle optional entities #845

Open
Mrc0113 opened this issue May 25, 2017 · 0 comments
Open

Update WKTParser to handle optional entities #845

Mrc0113 opened this issue May 25, 2017 · 0 comments

Comments

@Mrc0113
Copy link

Mrc0113 commented May 25, 2017

WKTParser should be updated to allow for optional AUTHORITY & AXIS entities when parsing GEOGCS & PROJCS. Currently they result in parsing errors.

The best WKT entity definitions I can find are here: http:https://docs.geotools.org/stable/javadocs/org/opengis/referencing/doc-files/WKT.html

Here is a sample of a WKT that currenlty fails (after removing new lines & extra spaces)

PROJCS["US National Conformal Conic",
  GEOGCS["Unspecified datum based upon the International 1924 Authalic Sphere",
    DATUM["Not_specified_based_on_International_1924_Authalic_Sphere",
      SPHEROID["International 1924 AuthalicSphere", 6371229.0, 0.0, AUTHORITY["EPSG","7057"]],
      AUTHORITY["EPSG","6053"]],
    PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
    UNIT["degree", 0.017453292519943295],
    AXIS["Geodetic longitude", EAST],
    AXIS["Geodetic latitude", NORTH],
    AUTHORITY["EPSG","4053"]],
  PROJECTION["Lambert_Conformal_Conic_2SP"],
  PARAMETER["central_meridian", -95.0],
  PARAMETER["latitude_of_origin", 25.0],
  PARAMETER["standard_parallel_1", 24.999994999999995],
  PARAMETER["false_easting", 0.0],
  PARAMETER["false_northing", 0.0],
  PARAMETER["scale_factor", 1.0],
  PARAMETER["standard_parallel_2", 24.999994999999995],
  UNIT["m", 1.0],
  AXIS["Easting", EAST],
  AXIS["Northing", NORTH],
  AUTHORITY["EPSG","920001"]]

*Note that it would also be nice to not have the parsing fail when there is a space after a comma between entities.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant