cf-convention / cf-conventions

AsciiDoc Source
http://cfconventions.org/cf-conventions/cf-conventions
Creative Commons Zero v1.0 Universal
87 stars 46 forks source link

CRS WKT given in example 5.12 is invalid #566

Open observingClouds opened 5 days ago

observingClouds commented 5 days ago

Title

Chapter 5: Example 5.12 with invalid crs wkt

Moderator

TBD

Requirement Summary

The crs_wkt attribute in example 5.12 needs slight adjustments to become a valid crs wkt string.

Technical Proposal Summary

  1. Decide on example fixture (minimal or conform with WKT:2015)
  2. Update example 5.12

    Benefits

    The CF-conventions are a trusted source for well defined standards. Ensuring the CRS WKT string follows the WKT specifications shows that CF respects underlying specifications. Examples are probably often copied and adapted to the users needs, ensuring the examples follow all standards, ensures that more downstream products will follow those standards as well.

    Status Quo

    The crs wkt string of example 5.12 fails, e.g. when reading via the pyproj library and the underlying proj library.

    Associated pull request

    The suggested minimal changes can be viewed at https://github.com/observingClouds/cf-conventions/commit/72e43de41410981add689109fcbb5b2b9b8ab41c

    Detailed Proposal

    Upon testing the interpretation of the projection information given in several cf-convention examples, it turned out that the crs_wkt in example 5.12 cannot be read:

CRSError: Invalid projection: COMPOUNDCRS ["OSGB 1936 / Br...: (Internal Proj Error: proj_create: Missing BASEGEODCRS / BASEGEOGCRS / GEOGCS node)

Raising this issue with the used library to read the crs_wkt, confirmed that the issue is not a library issue but an invalid crs wkt string

JonathanGregory commented 4 days ago

Dear Hauke @observingClouds

Thanks very much for testing the examples and reporting the error along with a correction. That's ideal! If you are willing to make a PR from your proposed correction and attach it to this issue, it will help us implement it in the imminent CF 1.12 release. As a defect, this issue will be agreed in three weeks, on 3rd December, if no-one raises any concerns.

Best wishes

Jonathan

JonathanGregory commented 4 days ago

Thanks for the preparing the PR, Hauke. We'll leave it open until 3rd December, according to the usual rules for updates.