3

This is similar to this rather old post for a much older version of QGIS, but I'm still getting the same behaviour: Defining new custom projections in QGIS?

Basically I'm defining a new Custom Projection in QGIS using this proj4 string from epsg.io (http://epsg.io/26332-1167):

+proj=utm +zone=32 +ellps=clrk80 +towgs84=-81,-84,115,0,0,0,0 +units=m +no_defs

I'm entering it as per the screenshot below. I click OK.

enter image description here

Then I reopen Custom Projections straight after, and all the proj4 params have completely changed:

enter image description here

Why is this happening?

Are the params in the second screenshot equivalent to those specified in the first?

I'm on QGIS version 3.10.1, the screenshot below shows the other gubbins if useful:

enter image description here

  • 1
    Read this blog.qgis.org/2020/01/24/… it seem that GDAL and PROJ had/causes some problem in 3.10, the advice is to update to 3.10.2; your problem may be related to this – J.R Jan 29 at 13:36
1

Why is this happening?

Because lot of changes in the way that QGIS handle datum transformations are being made, and seems like in your version (I have the same) some one of those changes has introduced a bug.

This changes are necessary because lot of changes in PROJ are being made.

Take into account that PROJ.4 strings are not the best way to describe coordinate reference systems.


Are the params in the second screenshot equivalent to those specified in the first?

Clearly not.

Seems like QGIS is reformulating your CRS definition with the Nord Sahara 1959 to WGS 84 (9) datum transformation.

Maybe because it is the only datum transformation registered in PROJ database for the Clarke 1880 mod. ellipsoid (I didn't check if there are other transformations registered for a CRS with the same ellipsoid).


What to do?

  • You can use the LTR release (3.4) of QGIS to handle CRSs defined with PROJ.4 strings.

  • Also, you can upgrade to the latest stable version and test how it handles your definition.

  • You can see the WKT2 definition of your CRS with projinfo. From an OSGeo4W console:

C:\>projinfo "+proj=utm +zone=32 +ellps=clrk80 +towgs84=-81,-84,115,0,0,0,0 +units=m +no_defs +type=crs"
PROJ.4 string:
+proj=utm +zone=32 +ellps=clrk80 +towgs84=-81,-84,115,0,0,0,0 +units=m +no_defs +type=crs

WKT2_2018 string:
BOUNDCRS[
    SOURCECRS[
        PROJCRS["unknown",
            BASEGEOGCRS["unknown",
                DATUM["Unknown based on Clarke 1880 mod. ellipsoid",
                    ELLIPSOID["Clarke 1880 mod.",6378249.145,293.4663,
                        LENGTHUNIT["metre",1,
                            ID["EPSG",9001]]]],
                PRIMEM["Greenwich",0,
                    ANGLEUNIT["degree",0.0174532925199433],
                    ID["EPSG",8901]]],
            CONVERSION["UTM zone 32N",
                METHOD["Transverse Mercator",
                    ID["EPSG",9807]],
                PARAMETER["Latitude of natural origin",0,
                    ANGLEUNIT["degree",0.0174532925199433],
                    ID["EPSG",8801]],
                PARAMETER["Longitude of natural origin",9,
                    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",0,
                    LENGTHUNIT["metre",1],
                    ID["EPSG",8807]],
                ID["EPSG",16032]],
            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]]]]],
    TARGETCRS[
        GEOGCRS["WGS 84",
            DATUM["World Geodetic System 1984",
                ELLIPSOID["WGS 84",6378137,298.257223563,
                    LENGTHUNIT["metre",1]]],
            PRIMEM["Greenwich",0,
                ANGLEUNIT["degree",0.0174532925199433]],
            CS[ellipsoidal,2],
                AXIS["latitude",north,
                    ORDER[1],
                    ANGLEUNIT["degree",0.0174532925199433]],
                AXIS["longitude",east,
                    ORDER[2],
                    ANGLEUNIT["degree",0.0174532925199433]],
            ID["EPSG",4326]]],
    ABRIDGEDTRANSFORMATION["Transformation from unknown to WGS84",
        METHOD["Position Vector transformation (geog2D domain)",
            ID["EPSG",9606]],
        PARAMETER["X-axis translation",-81,
            ID["EPSG",8605]],
        PARAMETER["Y-axis translation",-84,
            ID["EPSG",8606]],
        PARAMETER["Z-axis translation",115,
            ID["EPSG",8607]],
        PARAMETER["X-axis rotation",0,
            ID["EPSG",8608]],
        PARAMETER["Y-axis rotation",0,
            ID["EPSG",8609]],
        PARAMETER["Z-axis rotation",0,
            ID["EPSG",8610]],
        PARAMETER["Scale difference",1,
            ID["EPSG",8611]]]]

And I hope that we can define custom CRS with WKT2 definitions soon.

  • You can transform your data with GDAL/OGR, using WKT2 definitions or custom transformations pipelines. If you want to transform your data to EPSG:4326, you can check the WKT2 definition of the transformation and its custom pipeline with projinfo:
C:\>projinfo -s "+proj=utm +zone=32 +ellps=clrk80 +towgs84=-81,-84,115,0,0,0,0 +units=m +no_defs +type=crs" -t EPSG:4326
Candidate operations found: 1
-------------------------------------
Operation n┬░1:

unknown id, Inverse of UTM zone 32N + Transformation from unknown to WGS84, unknown accuracy, World

PROJ string:
+proj=pipeline +step +inv +proj=utm +zone=32 +ellps=clrk80 +step +proj=push +v_3 +step +proj=cart +ellps=clrk80 +step +proj=helmert +x=-81 +y=-84 +z=115 +rx=0 +ry=0 +rz=0 +s=0 +convention=position_vector +step +inv +proj=cart +ellps=WGS84 +step +proj=pop +v_3 +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1

WKT2_2018 string:
CONCATENATEDOPERATION["Inverse of UTM zone 32N + Transformation from unknown to WGS84",
    SOURCECRS[
        PROJCRS["unknown",
            BASEGEOGCRS["unknown",
                DATUM["Unknown based on Clarke 1880 mod. ellipsoid",
                    ELLIPSOID["Clarke 1880 mod.",6378249.145,293.4663,
                        LENGTHUNIT["metre",1,
                            ID["EPSG",9001]]]],
                PRIMEM["Greenwich",0,
                    ANGLEUNIT["degree",0.0174532925199433],
                    ID["EPSG",8901]]],
            CONVERSION["UTM zone 32N",
                METHOD["Transverse Mercator",
                    ID["EPSG",9807]],
                PARAMETER["Latitude of natural origin",0,
                    ANGLEUNIT["degree",0.0174532925199433],
                    ID["EPSG",8801]],
                PARAMETER["Longitude of natural origin",9,
                    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",0,
                    LENGTHUNIT["metre",1],
                    ID["EPSG",8807]],
                ID["EPSG",16032]],
            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]]]]],
    TARGETCRS[
        GEOGCRS["WGS 84",
            DATUM["World Geodetic System 1984",
                ELLIPSOID["WGS 84",6378137,298.257223563,
                    LENGTHUNIT["metre",1]]],
            PRIMEM["Greenwich",0,
                ANGLEUNIT["degree",0.0174532925199433]],
            CS[ellipsoidal,2],
                AXIS["latitude",north,
                    ORDER[1],
                    ANGLEUNIT["degree",0.0174532925199433]],
                AXIS["longitude",east,
                    ORDER[2],
                    ANGLEUNIT["degree",0.0174532925199433]],
            ID["EPSG",4326]]],
    STEP[
        CONVERSION["Inverse of UTM zone 32N",
            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",9,
                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",0,
                LENGTHUNIT["metre",1],
                ID["EPSG",8807]],
            ID["INVERSE(EPSG)",16032]]],
    STEP[
        COORDINATEOPERATION["Transformation from unknown to WGS84",
            SOURCECRS[
                GEOGCRS["unknown",
                    DATUM["Unknown based on Clarke 1880 mod. ellipsoid",
                        ELLIPSOID["Clarke 1880 mod.",6378249.145,293.4663,
                            LENGTHUNIT["metre",1,
                                ID["EPSG",9001]]]],
                    PRIMEM["Greenwich",0,
                        ANGLEUNIT["degree",0.0174532925199433],
                        ID["EPSG",8901]],
                    CS[ellipsoidal,2],
                        AXIS["longitude",east,
                            ORDER[1],
                            ANGLEUNIT["degree",0.0174532925199433,
                                ID["EPSG",9122]]],
                        AXIS["latitude",north,
                            ORDER[2],
                            ANGLEUNIT["degree",0.0174532925199433,
                                ID["EPSG",9122]]]]],
            TARGETCRS[
                GEOGCRS["WGS 84",
                    DATUM["World Geodetic System 1984",
                        ELLIPSOID["WGS 84",6378137,298.257223563,
                            LENGTHUNIT["metre",1]]],
                    PRIMEM["Greenwich",0,
                        ANGLEUNIT["degree",0.0174532925199433]],
                    CS[ellipsoidal,2],
                        AXIS["latitude",north,
                            ORDER[1],
                            ANGLEUNIT["degree",0.0174532925199433]],
                        AXIS["longitude",east,
                            ORDER[2],
                            ANGLEUNIT["degree",0.0174532925199433]],
                    ID["EPSG",4326]]],
            METHOD["Position Vector transformation (geog2D domain)",
                ID["EPSG",9606]],
            PARAMETER["X-axis translation",-81,
                LENGTHUNIT["metre",1],
                ID["EPSG",8605]],
            PARAMETER["Y-axis translation",-84,
                LENGTHUNIT["metre",1],
                ID["EPSG",8606]],
            PARAMETER["Z-axis translation",115,
                LENGTHUNIT["metre",1],
                ID["EPSG",8607]],
            PARAMETER["X-axis rotation",0,
                ANGLEUNIT["arc-second",4.84813681109536E-06],
                ID["EPSG",8608]],
            PARAMETER["Y-axis rotation",0,
                ANGLEUNIT["arc-second",4.84813681109536E-06],
                ID["EPSG",8609]],
            PARAMETER["Z-axis rotation",0,
                ANGLEUNIT["arc-second",4.84813681109536E-06],
                ID["EPSG",8610]],
            PARAMETER["Scale difference",0,
                SCALEUNIT["parts per million",1E-06],
                ID["EPSG",8611]]]],
    USAGE[
        SCOPE["unknown"],
        AREA["World"],
        BBOX[-90,-180,90,180]]]

Also, the WGS84 pivot point is not strictly necessary now, and you can find the transformation to other CRSs with the least amount of steps possible.

| improve this answer | |
  • 1
    Interesting, yes sounds like it's an ongoing process. I've upgraded to the latest version (3.10.2) and it does seem better. Looks like "Custom Projections" now recommends taking a WKT over the proj4 string as you mention. Will check out those additional projinfo tools. – Rob Burgess Jan 30 at 17:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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