Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scope, remarks missing from WKT? #2247

Closed
snowman2 opened this issue May 29, 2020 · 2 comments
Closed

Scope, remarks missing from WKT? #2247

snowman2 opened this issue May 29, 2020 · 2 comments
Labels

Comments

@snowman2
Copy link
Contributor

Related to #2237 as this recently popped up after the change.

This is more of a question as I am just verifying that this behavior is expected.

Example of problem

When creating a transformer using proj_create_operations:

>>> from pyproj.transformer import TransformerGroup
>>> transformer = TransformerGroup(28356, 7856).transformers[0]

I can get the operations using proj_concatoperation_get_step.

However, for some reason the WKT does not have the scope & remarks for this operation even through it is present on the operation step:

>>> print(transformer.operations[0].to_wkt(pretty=True))
CONVERSION["Inverse of Map Grid of Australia zone 56",
    METHOD["Inverse of Transverse Mercator",
        ID["INVERSE(EPSG)",9807]],
    PARAMETER["Latitude of natural origin",0,
        ANGLEUNIT["degree",0.0174532925199433],
        ID["EPSG",8801]],
    PARAMETER["Longitude of natural origin",153,
        ANGLEUNIT["degree",0.0174532925199433],
        ID["EPSG",8802]],
    PARAMETER["Scale factor at natural origin",0.9996,
        SCALEUNIT["unity",1],
        ID["EPSG",8805]],
    PARAMETER["False easting",500000,
        LENGTHUNIT["metre",1],
        ID["EPSG",8806]],
    PARAMETER["False northing",10000000,
        LENGTHUNIT["metre",1],
        ID["EPSG",8807]],
    ID["INVERSE(EPSG)",17356]]
>>> transformer.operations[0].scope
'Large and medium scale topographic mapping and engineering survey.'
>>> transformer.operations[0].remarks
'Grid convergence uses opposite sign convention to UTM.'

But, on the next operation step, it is present in the WKT:

>>> print(transformer.operations[1].to_wkt(pretty=True))
COORDINATEOPERATION["GDA94 to GDA2020 (1)",
    VERSION["ICSM-Aus"],
    SOURCECRS[
        GEOGCRS["GDA94",
            DATUM["Geocentric Datum of Australia 1994",
                ELLIPSOID["GRS 1980",6378137,298.257222101,
                    LENGTHUNIT["metre",1]]],
            PRIMEM["Greenwich",0,
                ANGLEUNIT["degree",0.0174532925199433]],
            CS[ellipsoidal,2],
                AXIS["geodetic latitude (Lat)",north,
                    ORDER[1],
                    ANGLEUNIT["degree",0.0174532925199433]],
                AXIS["geodetic longitude (Lon)",east,
                    ORDER[2],
                    ANGLEUNIT["degree",0.0174532925199433]],
            ID["EPSG",4283]]],
    TARGETCRS[
        GEOGCRS["GDA2020",
            DATUM["Geocentric Datum of Australia 2020",
                ELLIPSOID["GRS 1980",6378137,298.257222101,
                    LENGTHUNIT["metre",1]]],
            PRIMEM["Greenwich",0,
                ANGLEUNIT["degree",0.0174532925199433]],
            CS[ellipsoidal,2],
                AXIS["geodetic latitude (Lat)",north,
                    ORDER[1],
                    ANGLEUNIT["degree",0.0174532925199433]],
                AXIS["geodetic longitude (Lon)",east,
                    ORDER[2],
                    ANGLEUNIT["degree",0.0174532925199433]],
            ID["EPSG",7844]]],
    METHOD["Coordinate Frame rotation (geog2D domain)",
        ID["EPSG",9607]],
    PARAMETER["X-axis translation",61.55,
        LENGTHUNIT["millimetre",0.001],
        ID["EPSG",8605]],
    PARAMETER["Y-axis translation",-10.87,
        LENGTHUNIT["millimetre",0.001],
        ID["EPSG",8606]],
    PARAMETER["Z-axis translation",-40.19,
        LENGTHUNIT["millimetre",0.001],
        ID["EPSG",8607]],
    PARAMETER["X-axis rotation",-39.4924,
        ANGLEUNIT["milliarc-second",4.84813681109536E-09],
        ID["EPSG",8608]],
    PARAMETER["Y-axis rotation",-32.7221,
        ANGLEUNIT["milliarc-second",4.84813681109536E-09],
        ID["EPSG",8609]],
    PARAMETER["Z-axis rotation",-32.8979,
        ANGLEUNIT["milliarc-second",4.84813681109536E-09],
        ID["EPSG",8610]],
    PARAMETER["Scale difference",-9.994,
        SCALEUNIT["parts per billion",1E-09],
        ID["EPSG",8611]],
    OPERATIONACCURACY[0.01],
    USAGE[
        SCOPE["Conformal transformation of GDA94 coordinates that have been derived through GNSS CORS."],
        AREA["Australia - GDA"],
        BBOX[-60.56,93.41,-8.47,173.35]],
    ID["EPSG",8048],
    REMARK["Scale difference in ppb where 1/billion = 1E-9. See CT codes 8444-46 for NTv2 method giving equivalent results for Christmas Island, Cocos Islands and Australia respectively. See CT code 8447 for alternative including distortion model for Australia only."]]

Is this a limitation of the WKT format?

Environment Information

  • PROJ version 7.1.0
  • Operation System Information - Linux-4.15.0-101-generic-x86_64-with-glibc2.10

Installation method

  • From source
@rouault
Copy link
Member

rouault commented May 29, 2020

Is this a limitation of the WKT format?

yes. The BNF grammar is at http://docs.opengeospatial.org/is/18-010r7/18-010r7.html#76 . See which only accepts a [ { } ] , contrary to COORDINATEOPERATION ( http://docs.opengeospatial.org/is/18-010r7/18-010r7.html#132 ) whichs accepts . The reason is probably that CONVERSION is not intended to be nominally a standalone object, but embedded in a PROJCRS object (which can have a scope, extent, remark)

@snowman2
Copy link
Contributor Author

Thanks for verifying that this is expected 👍

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

No branches or pull requests

2 participants