QGIS – Custom-Derived CRS by Affine Transformation from EPSG:32633 and Its Persistence Issues

affine transformationcoordinate systemepsglayersqgis

I am working with QGIS 3.16, Win10.
With help of another SE-user I created several derived CRS by an affine transformation from EPSG:32633 CRS (see below) in order to shift some related layers a couple of meters. The sources of my layer sets are polygone-shp-vector-files and TrueDop-gtiff-raster-files with 'normal' EPSG:32633 as internal CRS. In case of the here given example the shifting values are 20 m towards west and 0 meters towards north. But for other layer sets there are 3 further custom CRS with a shift of 14/6, 10/8 6/10 meters towards west/north.
Assigning my custom CRS to my layers works principally fine: The respective layers are shown with an offset of 20 m towards west in comparison to 'normal' EPSG:32633.
But if I close QGIS and open my project in a new QGIS-session at the next morning, the layers are reset to the 'normal' EPSG:32633-position on the Canvas, though the layer properties show the right custom CRS (see image, red underlined). But in turn, if going further into the CRS-selection menue, the 'normal' EPSG:32633 is marked to be set.

enter image description here

So I would have to reassign the costum CRS to the respective layers each time when runnning a new QGIS-session!

Anybody an idea what the reason could be, or how this could be solved?

Here the derived CRS string:

DERIVEDPROJCRS["32633-derived",
BASEPROJCRS["WGS 84 / UTM zone 33N",
    BASEGEOGCRS["WGS 84",
        DATUM["World Geodetic System 1984",
            ELLIPSOID["WGS 84",6378137,298.257223563,
                LENGTHUNIT["metre",1]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        ID["EPSG",4326]],
    CONVERSION["UTM zone 33N",
        METHOD["Transverse Mercator",
            ID["EPSG",9807]],
        PARAMETER["Latitude of natural origin",0,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8801]],
        PARAMETER["Longitude of natural origin",15,
            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]]]],
DERIVINGCONVERSION["Affine",
    METHOD["Affine parametric transformation",
        ID["EPSG",9624]],
    PARAMETER["A0",20,
        LENGTHUNIT["metre",1],
        ID["EPSG",8623]],
    PARAMETER["A1",1,
        SCALEUNIT["coefficient",1],
        ID["EPSG",8624]],
    PARAMETER["A2",0,
        SCALEUNIT["coefficient",1],
        ID["EPSG",8625]],
    PARAMETER["B0",0,
        LENGTHUNIT["metre",1],
        ID["EPSG",8639]],
    PARAMETER["B1",0,
        SCALEUNIT["coefficient",1],
        ID["EPSG",8640]],
    PARAMETER["B2",1,
        SCALEUNIT["coefficient",1],
        ID["EPSG",8641]]],
CS[Cartesian,2],
    AXIS["(E)",east,
        ORDER[1],
        LENGTHUNIT["metre",1]],
    AXIS["(N)",north,
        ORDER[2],
        LENGTHUNIT["metre",1]],
USAGE[
    SCOPE["unknown"],
    AREA["World - N hemisphere - 12°E to 18°E - by country"],
    BBOX[0,12,84,18]],
ID["EPSG",32633]]

Best Answer

We can't use the ID["EPSG",32633] attribute for the DERIVEDPROJCRS[] node, because it is the identification of the WGS84 / UTM Zone 33N projected CRS.
QGIS 3.18 does not accept it.

Try with the following definition:

DERIVEDPROJCRS["32633-derived",
  BASEPROJCRS["WGS 84 / UTM zone 33N",
    BASEGEOGCRS["WGS 84",
        DATUM["World Geodetic System 1984",
            ELLIPSOID["WGS 84",6378137,298.257223563,
                LENGTHUNIT["metre",1]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        ID["EPSG",4326]],
    CONVERSION["UTM zone 33N",
        METHOD["Transverse Mercator",
            ID["EPSG",9807]],
        PARAMETER["Latitude of natural origin",0,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8801]],
        PARAMETER["Longitude of natural origin",15,
            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]]]],
  DERIVINGCONVERSION["Affine",
    METHOD["Affine parametric transformation",
        ID["EPSG",9624]],
    PARAMETER["A0",20,
        LENGTHUNIT["metre",1],
        ID["EPSG",8623]],
    PARAMETER["A1",1,
        SCALEUNIT["coefficient",1],
        ID["EPSG",8624]],
    PARAMETER["A2",0,
        SCALEUNIT["coefficient",1],
        ID["EPSG",8625]],
    PARAMETER["B0",0,
        LENGTHUNIT["metre",1],
        ID["EPSG",8639]],
    PARAMETER["B1",0,
        SCALEUNIT["coefficient",1],
        ID["EPSG",8640]],
    PARAMETER["B2",1,
        SCALEUNIT["coefficient",1],
        ID["EPSG",8641]]],
  CS[Cartesian,2],
    AXIS["(E)",east,
        ORDER[1],
        LENGTHUNIT["metre",1]],
    AXIS["(N)",north,
        ORDER[2],
        LENGTHUNIT["metre",1]]]]

You will be able to close QGIS and reopen it. Layers (both vector and raster) will keep it.

We cannot yet assign the custom CRS to the source data. The standardization of the format is recent and many applications could not read them.

As far as possible, export the layers to EPSG:32633 or another CRS once they are located where you think they belong.

Related Question