2

I have the following proj string:

+pm=greenwich +ellps=GRS80 +a=6.37814e+06 +rf=298.257 +proj=tmerc +units=m +to_meter=1 +lat_0=42.5 +x_0=500000 +y_0=0 +lon_0=-72.5 +k_0=0.999964 +vunits=m

and I have an OGRSpatialReferenceObject. When I call SetFromUserInput() on the string using GDAL-2.4.3, and then call dumpReadable(), the output starts with

PROJCS["unnamed",
    GEOGCS["GRS 1980(IUGG, 1980)",
        DATUM["unknown",
            SPHEROID["GRS80",6378137,298.257222101]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]]

But when I do the same thing with GDAL-3.3.0, the output starts with

PROJCRS["unknown",                                                                                                                                                          
       BASEGEOGCRS["unknown",                                                                                                                                                      
            DATUM["unknown",                                                                                                                                                            
                ELLIPSOID["IAU 1976",6378140,298.257,                                                                                                                                       
                    LENGTHUNIT["metre",1,                                                                                                                                                       
                        ID["EPSG",9001]]]],                                                                                                                                         
            PRIMEM["Greenwich",0,                                                                                                                                                       
                ANGLEUNIT["degree",0.0174532925199433,                                                                                                                                      
                    ID["EPSG",9122]]]]

Why is GDAL-3.3.0 saying IAU 1976 instead of GRS 1980? Later on, this OGRSpatialReference object is computing the central meridian and false northing to both be zero (which is wrong), while the GDAL-2.4.3 version gets it right.

1 Answer 1

1

This was caused by having both +ellps and {+a, +rf} specified. Only one should be given.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.