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

CRS instanciation from PROJ.4 string: set 'Unknown based on XXXX ellipsoid' datum name... #3727

Merged
merged 1 commit into from
May 12, 2023

Commits on May 11, 2023

  1. CRS instanciation from PROJ.4 string: set 'Unknown based on XXXX elli…

    …psoid' datum name...
    
    ...when instanciating from known +a,+rf
    
    and change WGS84 -> WGS 84 and GRS80 -> GRS 1980 to use EPSG names
    when building from +ellps=WGS84/GRS80 (fixes OSGeo#3725)
    
    Now we get
    ```
    $ bin/projinfo  "+proj=geos +lon_0=0 +h=35786400 +ellps=WGS84 +units=m +sweep=y +no_defs +type=crs"
    PROJ.4 string:
    +proj=geos +lon_0=0 +h=35786400 +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs +type=crs
    
    WKT2:2019 string:
    PROJCRS["unknown",
        BASEGEOGCRS["unknown",
            DATUM["Unknown based on WGS 84 ellipsoid",
                ELLIPSOID["WGS 84",6378137,298.257223563,
                    LENGTHUNIT["metre",1],
                    ID["EPSG",7030]]],
            PRIMEM["Greenwich",0,
                ANGLEUNIT["degree",0.0174532925199433],
                ID["EPSG",8901]]],
        CONVERSION["unknown",
            METHOD["Geostationary Satellite (Sweep Y)"],
            PARAMETER["Longitude of natural origin",0,
                ANGLEUNIT["degree",0.0174532925199433],
                ID["EPSG",8802]],
            PARAMETER["Satellite Height",35786400,
                LENGTHUNIT["metre",1,
                    ID["EPSG",9001]]],
            PARAMETER["False easting",0,
                LENGTHUNIT["metre",1],
                ID["EPSG",8806]],
            PARAMETER["False northing",0,
                LENGTHUNIT["metre",1],
                ID["EPSG",8807]]],
        CS[Cartesian,2],
            AXIS["(E)",east,
                ORDER[1],
                LENGTHUNIT["metre",1,
                    ID["EPSG",9001]]],
            AXIS["(N)",north,
                ORDER[2],
                LENGTHUNIT["metre",1,
                    ID["EPSG",9001]]]]
    
    $ bin/projinfo  "+proj=geos +lon_0=0 +h=35786400 +a=6378137.0 +rf=298.257223563 +units=m +sweep=y +no_defs +type=crs"
    PROJ.4 string:
    +proj=geos +lon_0=0 +h=35786400 +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs +type=crs
    
    WKT2:2019 string:
    PROJCRS["unknown",
        BASEGEOGCRS["unknown",
            DATUM["Unknown based on WGS 84 ellipsoid",
                ELLIPSOID["WGS 84",6378137,298.257223563,
                    LENGTHUNIT["metre",1,
                        ID["EPSG",9001]]]],
            PRIMEM["Greenwich",0,
                ANGLEUNIT["degree",0.0174532925199433],
                ID["EPSG",8901]]],
        CONVERSION["unknown",
            METHOD["Geostationary Satellite (Sweep Y)"],
            PARAMETER["Longitude of natural origin",0,
                ANGLEUNIT["degree",0.0174532925199433],
                ID["EPSG",8802]],
            PARAMETER["Satellite Height",35786400,
                LENGTHUNIT["metre",1,
                    ID["EPSG",9001]]],
            PARAMETER["False easting",0,
                LENGTHUNIT["metre",1],
                ID["EPSG",8806]],
            PARAMETER["False northing",0,
                LENGTHUNIT["metre",1],
                ID["EPSG",8807]]],
        CS[Cartesian,2],
            AXIS["(E)",east,
                ORDER[1],
                LENGTHUNIT["metre",1,
                    ID["EPSG",9001]]],
            AXIS["(N)",north,
                ORDER[2],
                LENGTHUNIT["metre",1,
                    ID["EPSG",9001]]]]
    ```
    rouault committed May 11, 2023
    Configuration menu
    Copy the full SHA
    964d4da View commit details
    Browse the repository at this point in the history