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

Creating a user-defined Compound CRS #4295

Open
dvargas74 opened this issue Oct 29, 2024 · 11 comments
Open

Creating a user-defined Compound CRS #4295

dvargas74 opened this issue Oct 29, 2024 · 11 comments

Comments

@dvargas74
Copy link

Hi,

I would like to know what's the best way to create compound CRS with a EPSG geodetic CRS and user vertical CRS.

The question is done because there's not any coordinate operations to do this conversion / transformation for Finland:

EPSG:4979 - WGS 84 (Geographic 3D) to EPSG:3136+EPSG:3900 - ETRS89 / ETRS-GK29FIN + N2000 height (Projected + Vertical)

Then, I created this CRS with PROJ definition, which it works:

+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=31500000 +y_0=0 +towgs84=0.000,0.000,0.000,0.00000000,0.00000000,0.00000000,0.00000000 +a=6378137.00000000 +b=6356752.31414036 +pm=greenwich +geoidgrids=n2000.gtx +units=m +no_defs +type=crs

Then, the following conversion/transformation is done:

EPSG:4979 - WGS 84 (Geographic 3D) to MyUserCRS

The question is:

Is it possible to create only the vertical CRS and use a EPSG code for the geodetic CRS? EPSG:3136 + MyVerticalCRS

What would be the correct definition for this compound CRS?

Thanks,

@rouault
Copy link
Member

rouault commented Oct 29, 2024

@jratike80 Still no news from NLS Finland regarding adding your N2000 geoid grid in PROJ ?

@jratike80
Copy link

Registration into EPSG database is forwarding slowly. Maybe during this year, maybe next. New geoid model https://www.maanmittauslaitos.fi/en/maps-and-spatial-data/coordinates-and-positioning/koordinaattimuunnokset/fin2023n2000-geoidimalli will be registered by the same. I have also a self-made GeoTIFF about the model but experts have not verified it.

A command that I got from an expert for converting N2000 heights (epoch 2024.33) into EGM2008 is a bit complicated. An example that is using cct on Windows (here still the older geoid model FIN2005N00.tif). The difference between the 2005 and 2023 models is less than 14 mm if I remember right. I believe that tranformation into EPSG:4979 would look quite similar but I must admit that I do not really understand these things.

echo 109278.256 6688006.739 72.04 2024.33 | cct +proj=pipeline +ellps=GRS80 ^
+step +inv +proj=utm +zone=35 ^
+step +proj=vgridshift +grids=FIN2005N00.tif +multiplier=1 ^
+step +proj=cart +ellps=GRS80 ^
+step +inv +proj=deformation +dt=-3 +grids=eur_nkg_nkgrf17vel.tif ^
+step +inv +proj=helmert +x=0.15651 +y=-0.10993 +z=-0.10935 +rx=-0.00312861 +ry=-0.00378935 +rz=0.00403512 +s=0.00529 +convention=position_vector ^
+step +proj=deformation +t_epoch=2000.0 +grids=eur_nkg_nkgrf17vel.tif ^
+step +inv +proj=helmert +x=0 +y=0 +z=0 +rx=0 +ry=0 +rz=0 +s=0 +dx=0 +dy=0 +dz=0 +drx=8.5e-05 +dry=0.000531 +drz=-0.00077 +ds=0 +t_epoch=1989 +convention=position_vector ^
+step +proj=helmert +x=0.0014 +y=0.0009 +z=-0.0014 +rx=0 +ry=0 +rz=0 +s=0.00042 +dx=0 +dy=0.0001 +dz=-0.0002 +drx=0 +dry=0 +drz=0 +ds=0 +t_epoch=2015 +convention=position_vector ^
+step +inv +proj=cart +ellps=GRS80 ^
+step +inv +proj=vgridshift +grids=us_nga_egm08_25.tif +multiplier=1 ^
+step +proj=axisswap +order=2,1

@dvargas74
Copy link
Author

Hi,
Thanks for this clarification but that's not exactly what I need.

This PROJ string does the conversion in a right way:

+proj=tmerc +lat_0=0 +lon_0=29 +k=1 +x_0=29500000 +y_0=0 +towgs84=0.000,0.000,0.000,0.00000000,0.00000000,0.00000000,0.00000000 +a=6378137.00000000 +b=6356752.31414036 +pm=greenwich +geoidgrids=n2000.gtx +units=m +no_defs +type=crs

But, there are many EPSG codes available for Finland which can work with the same geoid so, instead of creating a PROJ string per EPSG code plus geoid, I would need to know if PROJ library accept a combination of string for proj_create() function, such as:

EPSG:3883 + MyVerticalCRS

Of course, if PROJ support this:

EPSG:3136+EPSG:3900 - ETRS89 / ETRS-GK29FIN + N2000 height

I don't need to create user-defined CRS.

Thanks,

@kbevers
Copy link
Member

kbevers commented Oct 30, 2024

You can do this:

projinfo EPSG:3136+EPSG:3900
PROJ.4 string:
+proj=tmerc +lat_0=0 +lon_0=29 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +no_defs +type=crs

WKT2:2019 string:
COMPOUNDCRS["ETRS89 / ETRS-GK29FIN + N2000 height",
    PROJCRS["ETRS89 / ETRS-GK29FIN",
        BASEGEOGCRS["ETRS89",
            ENSEMBLE["European Terrestrial Reference System 1989 ensemble",
                MEMBER["European Terrestrial Reference Frame 1989"],
                MEMBER["European Terrestrial Reference Frame 1990"],
                MEMBER["European Terrestrial Reference Frame 1991"],
                MEMBER["European Terrestrial Reference Frame 1992"],
                MEMBER["European Terrestrial Reference Frame 1993"],
                MEMBER["European Terrestrial Reference Frame 1994"],
                MEMBER["European Terrestrial Reference Frame 1996"],
                MEMBER["European Terrestrial Reference Frame 1997"],
                MEMBER["European Terrestrial Reference Frame 2000"],
                MEMBER["European Terrestrial Reference Frame 2005"],
                MEMBER["European Terrestrial Reference Frame 2014"],
                ELLIPSOID["GRS 1980",6378137,298.257222101,
                    LENGTHUNIT["metre",1]],
                ENSEMBLEACCURACY[0.1]],
            PRIMEM["Greenwich",0,
                ANGLEUNIT["degree",0.0174532925199433]],
            ID["EPSG",4258]],
        CONVERSION["Finland ETRS-GK29",
            METHOD["Transverse Mercator",
                ID["EPSG",9807]],
            PARAMETER["Latitude of natural origin",0,
                ANGLEUNIT["degree",0.0174532925199433],
                ID["EPSG",8801]],
            PARAMETER["Longitude of natural origin",29,
                ANGLEUNIT["degree",0.0174532925199433],
                ID["EPSG",8802]],
            PARAMETER["Scale factor at natural origin",1,
                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]]],
        CS[Cartesian,2],
            AXIS["northing (N)",north,
                ORDER[1],
                LENGTHUNIT["metre",1]],
            AXIS["easting (E)",east,
                ORDER[2],
                LENGTHUNIT["metre",1]],
        USAGE[
            SCOPE["Cadastre, engineering survey, topographic mapping (large scale)."],
            AREA["Finland - between 28┬░30'E and 29┬░30'E."],
            BBOX[60.94,28.5,69.81,29.5]],
        ID["EPSG",3136]],
    VERTCRS["N2000 height",
        VDATUM["N2000"],
        CS[vertical,1],
            AXIS["gravity-related height (H)",up,
                LENGTHUNIT["metre",1]],
        USAGE[
            SCOPE["Geodesy, engineering survey."],
            AREA["Finland - onshore."],
            BBOX[59.75,19.24,70.09,31.59]],
        ID["EPSG",3900]]]

And if you want to check if the transformation you are interested in is possible, try this:

projinfo -s EPSG:4979 -t EPSG:3136+EPSG:3900
Candidate operations found: 2
-------------------------------------
Operation No. 1:

unknown id, Inverse of Transformation from N2000 height to WGS 84 (ballpark vertical transformation, without ellipsoid height to vertical height correction) + Inverse of ETRS89 to WGS 84 (1) + Finland ETRS-GK29, unknown accuracy, Europe - onshore and offshore: Albania; Andorra; Austria; Belgium; Bosnia and Herzegovina; Bulgaria; Croatia; Cyprus; Czechia; Denmark; Estonia; Faroe Islands; Finland; France; Germany; Gibraltar; Greece; Hungary; Ireland; Italy; Kosovo; Latvia; Liechtenstein; Lithuania; Luxembourg; Malta; Moldova; Monaco; Montenegro; Netherlands; North Macedonia; Norway including Svalbard and Jan Mayen; Poland; Portugal; Romania; San Marino; Serbia; Slovakia; Slovenia; Spain; Sweden; Switzerland; United Kingdom (UK) including Channel Islands and Isle of Man; Vatican City State., has ballpark transformation

PROJ string:
+proj=pipeline
  +step +proj=axisswap +order=2,1
  +step +proj=unitconvert +xy_in=deg +xy_out=rad
  +step +proj=tmerc +lat_0=0 +lon_0=29 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80
  +step +proj=axisswap +order=2,1

WKT2:2019 string:
CONCATENATEDOPERATION["Inverse of Transformation from N2000 height to WGS 84 (ballpark vertical transformation, without ellipsoid height to vertical height correction) + Inverse of ETRS89 to WGS 84 (1) + Finland ETRS-GK29",
    SOURCECRS[
        GEOGCRS["WGS 84",
            ENSEMBLE["World Geodetic System 1984 ensemble",
                MEMBER["World Geodetic System 1984 (Transit)"],
                MEMBER["World Geodetic System 1984 (G730)"],
                MEMBER["World Geodetic System 1984 (G873)"],
                MEMBER["World Geodetic System 1984 (G1150)"],
                MEMBER["World Geodetic System 1984 (G1674)"],
                MEMBER["World Geodetic System 1984 (G1762)"],
                MEMBER["World Geodetic System 1984 (G2139)"],
                ELLIPSOID["WGS 84",6378137,298.257223563,
                    LENGTHUNIT["metre",1]],
                ENSEMBLEACCURACY[2.0]],
            PRIMEM["Greenwich",0,
                ANGLEUNIT["degree",0.0174532925199433]],
            CS[ellipsoidal,3],
                AXIS["geodetic latitude (Lat)",north,
                    ORDER[1],
                    ANGLEUNIT["degree",0.0174532925199433]],
                AXIS["geodetic longitude (Lon)",east,
                    ORDER[2],
                    ANGLEUNIT["degree",0.0174532925199433]],
                AXIS["ellipsoidal height (h)",up,
                    ORDER[3],
                    LENGTHUNIT["metre",1]],
            ID["EPSG",4979]]],
    TARGETCRS[
        COMPOUNDCRS["ETRS89 / ETRS-GK29FIN + N2000 height",
            PROJCRS["ETRS89 / ETRS-GK29FIN",
                BASEGEOGCRS["ETRS89",
                    ENSEMBLE["European Terrestrial Reference System 1989 ensemble",
                        MEMBER["European Terrestrial Reference Frame 1989"],
                        MEMBER["European Terrestrial Reference Frame 1990"],
                        MEMBER["European Terrestrial Reference Frame 1991"],
                        MEMBER["European Terrestrial Reference Frame 1992"],
                        MEMBER["European Terrestrial Reference Frame 1993"],
                        MEMBER["European Terrestrial Reference Frame 1994"],
                        MEMBER["European Terrestrial Reference Frame 1996"],
                        MEMBER["European Terrestrial Reference Frame 1997"],
                        MEMBER["European Terrestrial Reference Frame 2000"],
                        MEMBER["European Terrestrial Reference Frame 2005"],
                        MEMBER["European Terrestrial Reference Frame 2014"],
                        ELLIPSOID["GRS 1980",6378137,298.257222101,
                            LENGTHUNIT["metre",1]],
                        ENSEMBLEACCURACY[0.1]],
                    PRIMEM["Greenwich",0,
                        ANGLEUNIT["degree",0.0174532925199433]],
                    ID["EPSG",4258]],
                CONVERSION["Finland ETRS-GK29",
                    METHOD["Transverse Mercator",
                        ID["EPSG",9807]],
                    PARAMETER["Latitude of natural origin",0,
                        ANGLEUNIT["degree",0.0174532925199433],
                        ID["EPSG",8801]],
                    PARAMETER["Longitude of natural origin",29,
                        ANGLEUNIT["degree",0.0174532925199433],
                        ID["EPSG",8802]],
                    PARAMETER["Scale factor at natural origin",1,
                        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]]],
                CS[Cartesian,2],
                    AXIS["northing (N)",north,
                        ORDER[1],
                        LENGTHUNIT["metre",1]],
                    AXIS["easting (E)",east,
                        ORDER[2],
                        LENGTHUNIT["metre",1]],
                ID["EPSG",3136]],
            VERTCRS["N2000 height",
                VDATUM["N2000"],
                CS[vertical,1],
                    AXIS["gravity-related height (H)",up,
                        LENGTHUNIT["metre",1]],
                ID["EPSG",3900]]]],
    STEP[
        COORDINATEOPERATION["Inverse of Transformation from N2000 height to WGS 84 (ballpark vertical transformation, without ellipsoid height to vertical height correction) + Inverse of ETRS89 to WGS 84 (1)",
            SOURCECRS[
                GEOGCRS["WGS 84",
                    ENSEMBLE["World Geodetic System 1984 ensemble",
                        MEMBER["World Geodetic System 1984 (Transit)"],
                        MEMBER["World Geodetic System 1984 (G730)"],
                        MEMBER["World Geodetic System 1984 (G873)"],
                        MEMBER["World Geodetic System 1984 (G1150)"],
                        MEMBER["World Geodetic System 1984 (G1674)"],
                        MEMBER["World Geodetic System 1984 (G1762)"],
                        MEMBER["World Geodetic System 1984 (G2139)"],
                        ELLIPSOID["WGS 84",6378137,298.257223563,
                            LENGTHUNIT["metre",1]],
                        ENSEMBLEACCURACY[2.0]],
                    PRIMEM["Greenwich",0,
                        ANGLEUNIT["degree",0.0174532925199433]],
                    CS[ellipsoidal,3],
                        AXIS["geodetic latitude (Lat)",north,
                            ORDER[1],
                            ANGLEUNIT["degree",0.0174532925199433]],
                        AXIS["geodetic longitude (Lon)",east,
                            ORDER[2],
                            ANGLEUNIT["degree",0.0174532925199433]],
                        AXIS["ellipsoidal height (h)",up,
                            ORDER[3],
                            LENGTHUNIT["metre",1]],
                    ID["EPSG",4979]]],
            TARGETCRS[
                COMPOUNDCRS["ETRS89 + N2000 height",
                    GEOGCRS["ETRS89",
                        ENSEMBLE["European Terrestrial Reference System 1989 ensemble",
                            MEMBER["European Terrestrial Reference Frame 1989"],
                            MEMBER["European Terrestrial Reference Frame 1990"],
                            MEMBER["European Terrestrial Reference Frame 1991"],
                            MEMBER["European Terrestrial Reference Frame 1992"],
                            MEMBER["European Terrestrial Reference Frame 1993"],
                            MEMBER["European Terrestrial Reference Frame 1994"],
                            MEMBER["European Terrestrial Reference Frame 1996"],
                            MEMBER["European Terrestrial Reference Frame 1997"],
                            MEMBER["European Terrestrial Reference Frame 2000"],
                            MEMBER["European Terrestrial Reference Frame 2005"],
                            MEMBER["European Terrestrial Reference Frame 2014"],
                            ELLIPSOID["GRS 1980",6378137,298.257222101,
                                LENGTHUNIT["metre",1]],
                            ENSEMBLEACCURACY[0.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",4258]],
                    VERTCRS["N2000 height",
                        VDATUM["N2000"],
                        CS[vertical,1],
                            AXIS["gravity-related height (H)",up,
                                LENGTHUNIT["metre",1]],
                        ID["EPSG",3900]]]],
            METHOD["PROJ-based operation method (approximate): +proj=noop"],
            REMARK["For ETRS89 to WGS 84 (1) (EPSG:1149): ETRS89 and WGS 84 are realizations of ITRS coincident to within 1 metre. This transformation has an accuracy equal to the coincidence figure."]]],
    STEP[
        CONVERSION["Finland ETRS-GK29",
            METHOD["Transverse Mercator",
                ID["EPSG",9807]],
            PARAMETER["Latitude of natural origin",0,
                ANGLEUNIT["degree",0.0174532925199433],
                ID["EPSG",8801]],
            PARAMETER["Longitude of natural origin",29,
                ANGLEUNIT["degree",0.0174532925199433],
                ID["EPSG",8802]],
            PARAMETER["Scale factor at natural origin",1,
                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",18197]]],
    USAGE[
        SCOPE["unknown"],
        AREA["Europe - onshore and offshore: Albania; Andorra; Austria; Belgium; Bosnia and Herzegovina; Bulgaria; Croatia; Cyprus; Czechia; Denmark; Estonia; Faroe Islands; Finland; France; Germany; Gibraltar; Greece; Hungary; Ireland; Italy; Kosovo; Latvia; Liechtenstein; Lithuania; Luxembourg; Malta; Moldova; Monaco; Montenegro; Netherlands; North Macedonia; Norway including Svalbard and Jan Mayen; Poland; Portugal; Romania; San Marino; Serbia; Slovakia; Slovenia; Spain; Sweden; Switzerland; United Kingdom (UK) including Channel Islands and Isle of Man; Vatican City State."],
        BBOX[32.88,-16.1,84.73,40.18]]]

-------------------------------------
Operation No. 2:

unknown id, Inverse of Transformation from N2000 height to WGS 84 (ballpark vertical transformation, without ellipsoid height to vertical height correction) + Inverse of Ballpark geographic offset from ETRS89 to WGS 84 + Finland ETRS-GK29, unknown accuracy, World, has ballpark transformation

PROJ string:
+proj=pipeline
  +step +proj=axisswap +order=2,1
  +step +proj=unitconvert +xy_in=deg +xy_out=rad
  +step +proj=tmerc +lat_0=0 +lon_0=29 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80
  +step +proj=axisswap +order=2,1

WKT2:2019 string:
CONCATENATEDOPERATION["Inverse of Transformation from N2000 height to WGS 84 (ballpark vertical transformation, without ellipsoid height to vertical height correction) + Inverse of Ballpark geographic offset from ETRS89 to WGS 84 + Finland ETRS-GK29",
    SOURCECRS[
        GEOGCRS["WGS 84",
            ENSEMBLE["World Geodetic System 1984 ensemble",
                MEMBER["World Geodetic System 1984 (Transit)"],
                MEMBER["World Geodetic System 1984 (G730)"],
                MEMBER["World Geodetic System 1984 (G873)"],
                MEMBER["World Geodetic System 1984 (G1150)"],
                MEMBER["World Geodetic System 1984 (G1674)"],
                MEMBER["World Geodetic System 1984 (G1762)"],
                MEMBER["World Geodetic System 1984 (G2139)"],
                ELLIPSOID["WGS 84",6378137,298.257223563,
                    LENGTHUNIT["metre",1]],
                ENSEMBLEACCURACY[2.0]],
            PRIMEM["Greenwich",0,
                ANGLEUNIT["degree",0.0174532925199433]],
            CS[ellipsoidal,3],
                AXIS["geodetic latitude (Lat)",north,
                    ORDER[1],
                    ANGLEUNIT["degree",0.0174532925199433]],
                AXIS["geodetic longitude (Lon)",east,
                    ORDER[2],
                    ANGLEUNIT["degree",0.0174532925199433]],
                AXIS["ellipsoidal height (h)",up,
                    ORDER[3],
                    LENGTHUNIT["metre",1]],
            ID["EPSG",4979]]],
    TARGETCRS[
        COMPOUNDCRS["ETRS89 / ETRS-GK29FIN + N2000 height",
            PROJCRS["ETRS89 / ETRS-GK29FIN",
                BASEGEOGCRS["ETRS89",
                    ENSEMBLE["European Terrestrial Reference System 1989 ensemble",
                        MEMBER["European Terrestrial Reference Frame 1989"],
                        MEMBER["European Terrestrial Reference Frame 1990"],
                        MEMBER["European Terrestrial Reference Frame 1991"],
                        MEMBER["European Terrestrial Reference Frame 1992"],
                        MEMBER["European Terrestrial Reference Frame 1993"],
                        MEMBER["European Terrestrial Reference Frame 1994"],
                        MEMBER["European Terrestrial Reference Frame 1996"],
                        MEMBER["European Terrestrial Reference Frame 1997"],
                        MEMBER["European Terrestrial Reference Frame 2000"],
                        MEMBER["European Terrestrial Reference Frame 2005"],
                        MEMBER["European Terrestrial Reference Frame 2014"],
                        ELLIPSOID["GRS 1980",6378137,298.257222101,
                            LENGTHUNIT["metre",1]],
                        ENSEMBLEACCURACY[0.1]],
                    PRIMEM["Greenwich",0,
                        ANGLEUNIT["degree",0.0174532925199433]],
                    ID["EPSG",4258]],
                CONVERSION["Finland ETRS-GK29",
                    METHOD["Transverse Mercator",
                        ID["EPSG",9807]],
                    PARAMETER["Latitude of natural origin",0,
                        ANGLEUNIT["degree",0.0174532925199433],
                        ID["EPSG",8801]],
                    PARAMETER["Longitude of natural origin",29,
                        ANGLEUNIT["degree",0.0174532925199433],
                        ID["EPSG",8802]],
                    PARAMETER["Scale factor at natural origin",1,
                        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]]],
                CS[Cartesian,2],
                    AXIS["northing (N)",north,
                        ORDER[1],
                        LENGTHUNIT["metre",1]],
                    AXIS["easting (E)",east,
                        ORDER[2],
                        LENGTHUNIT["metre",1]],
                ID["EPSG",3136]],
            VERTCRS["N2000 height",
                VDATUM["N2000"],
                CS[vertical,1],
                    AXIS["gravity-related height (H)",up,
                        LENGTHUNIT["metre",1]],
                ID["EPSG",3900]]]],
    STEP[
        COORDINATEOPERATION["Inverse of Transformation from N2000 height to WGS 84 (ballpark vertical transformation, without ellipsoid height to vertical height correction) + Inverse of Ballpark geographic offset from ETRS89 to WGS 84",
            SOURCECRS[
                GEOGCRS["WGS 84",
                    ENSEMBLE["World Geodetic System 1984 ensemble",
                        MEMBER["World Geodetic System 1984 (Transit)"],
                        MEMBER["World Geodetic System 1984 (G730)"],
                        MEMBER["World Geodetic System 1984 (G873)"],
                        MEMBER["World Geodetic System 1984 (G1150)"],
                        MEMBER["World Geodetic System 1984 (G1674)"],
                        MEMBER["World Geodetic System 1984 (G1762)"],
                        MEMBER["World Geodetic System 1984 (G2139)"],
                        ELLIPSOID["WGS 84",6378137,298.257223563,
                            LENGTHUNIT["metre",1]],
                        ENSEMBLEACCURACY[2.0]],
                    PRIMEM["Greenwich",0,
                        ANGLEUNIT["degree",0.0174532925199433]],
                    CS[ellipsoidal,3],
                        AXIS["geodetic latitude (Lat)",north,
                            ORDER[1],
                            ANGLEUNIT["degree",0.0174532925199433]],
                        AXIS["geodetic longitude (Lon)",east,
                            ORDER[2],
                            ANGLEUNIT["degree",0.0174532925199433]],
                        AXIS["ellipsoidal height (h)",up,
                            ORDER[3],
                            LENGTHUNIT["metre",1]],
                    ID["EPSG",4979]]],
            TARGETCRS[
                COMPOUNDCRS["ETRS89 + N2000 height",
                    GEOGCRS["ETRS89",
                        ENSEMBLE["European Terrestrial Reference System 1989 ensemble",
                            MEMBER["European Terrestrial Reference Frame 1989"],
                            MEMBER["European Terrestrial Reference Frame 1990"],
                            MEMBER["European Terrestrial Reference Frame 1991"],
                            MEMBER["European Terrestrial Reference Frame 1992"],
                            MEMBER["European Terrestrial Reference Frame 1993"],
                            MEMBER["European Terrestrial Reference Frame 1994"],
                            MEMBER["European Terrestrial Reference Frame 1996"],
                            MEMBER["European Terrestrial Reference Frame 1997"],
                            MEMBER["European Terrestrial Reference Frame 2000"],
                            MEMBER["European Terrestrial Reference Frame 2005"],
                            MEMBER["European Terrestrial Reference Frame 2014"],
                            ELLIPSOID["GRS 1980",6378137,298.257222101,
                                LENGTHUNIT["metre",1]],
                            ENSEMBLEACCURACY[0.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",4258]],
                    VERTCRS["N2000 height",
                        VDATUM["N2000"],
                        CS[vertical,1],
                            AXIS["gravity-related height (H)",up,
                                LENGTHUNIT["metre",1]],
                        ID["EPSG",3900]]]],
            METHOD["PROJ-based operation method (approximate): +proj=noop"]]],
    STEP[
        CONVERSION["Finland ETRS-GK29",
            METHOD["Transverse Mercator",
                ID["EPSG",9807]],
            PARAMETER["Latitude of natural origin",0,
                ANGLEUNIT["degree",0.0174532925199433],
                ID["EPSG",8801]],
            PARAMETER["Longitude of natural origin",29,
                ANGLEUNIT["degree",0.0174532925199433],
                ID["EPSG",8802]],
            PARAMETER["Scale factor at natural origin",1,
                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",18197]]],
    USAGE[
        SCOPE["unknown"],
        AREA["World"],
        BBOX[-90,-180,90,180]]]

@dvargas74
Copy link
Author

Thank you @kbevers

Note this
ballpark vertical transformation, without ellipsoid height to vertical height correction

This is the reason why I need to create my own CRS.

Instead of "EPSG:3136+EPSG:3900", I want to enter "EPSG:3136+MyVerticalCRS"

How I can define my own vertical CRS definition to concat with EPSG:3136 and call proj_create()?

@jratike80
Copy link

Without understanding deodecy deeply, I think that you do not need your own CRS but your own conversion from N2000, using either FIN2005N00 or FIN2023N00 grids. The time dependent post-glaciar bouncing and shift between WGS84 and ETRS89 probably don't make much difference. Using N2000 geoid (I suppose n2000.gtx means that) grid may be wrong because it takes the heights in the older N60 system EPSG:3901. But I do not know if it is possible to add such new conversion without coding on the Proj side.

Once the registration of all those Finnish components into EPSG registry is done then conversions should be much easier for users. I will mention this ticket for those who are working on it.

@dvargas74
Copy link
Author

@jratike80 thank you,

I think that the following CRS could be used if FIN2005N00 and FIN2023N00 grids were available in PROJ. Then, coordinate operations would exist including them.

EPSG:3136+EPSG:3900 - ETRS89 / ETRS-GK29FIN + N2000 height

I'm software engineer, I'm not an expert in geodesy but I've been working in this topic since 20 years ago. I can say that this PROJ string works, because the results are the same as an official finnish geodetic calculator.

+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=31500000 +y_0=0 +towgs84=0.000,0.000,0.000,0.00000000,0.00000000,0.00000000,0.00000000 +a=6378137.00000000 +b=6356752.31414036 +pm=greenwich +geoidgrids=n2000.gtx +units=m +no_defs +type=crs

So, I was trying to find a way, in PROJ, to mix EPSG code (or another authority) with my own vertical CRS definition. This is the question.

Thank you again,

@jratike80
Copy link

I guess that by the official Finnish geodetic calculator you mean the Coordinate Transformation tool here https://kartta.paikkatietoikkuna.fi/?lang=en. But it has newer supported WGS84 or EPSG:4979. Have you used EPSG:4937 as an output in your comparison? I suppose that the difference is not big but it would be nice to know.

@dvargas74
Copy link
Author

@jratike80 , exactly, that's the calculator I'm using to compare the calculations. The output is EPSG:3047 with N2000 as vertical CRS and the input EPSG:4937.

I've been writing about EPSG:4979 because is the input I need. I think that, the results should be equivalent to EPSG:4937.

@jjimenezshaw
Copy link
Contributor

jjimenezshaw commented Oct 30, 2024 via email

@dvargas74
Copy link
Author

@jjimenezshaw thank you for this info,

I think that this is the same solution that my initial PROJ string:

+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=31500000 +y_0=0 +towgs84=0.000,0.000,0.000,0.00000000,0.00000000,0.00000000,0.00000000 +a=6378137.00000000 +b=6356752.31414036 +pm=greenwich +geoidgrids=n2000.gtx +units=m +no_defs +type=crs

This solution also works,

Imagine you want to select one of the following EPSG CRSs:

EPSG:3879 - ETRS89 / GK25FIN
EPSG:3880 - ETRS89 / GK26FIN
EPSG:3881 - ETRS89 / GK27FIN
EPSG:3882 - ETRS89 / GK28FIN
EPSG:3883 - ETRS89 / GK29FIN
...

All of them with N2000 height.

I would like to have my WKT definition ONLY for N2000 and use the EPSG code:

proj_create("EPSG:3879+MyVerticalWktCrs")
proj_create("EPSG:3880+MyVerticalWktCrs")
proj_create("EPSG:3881+MyVerticalWktCrs")
proj_create("EPSG:3882+MyVerticalWktCrs")
....

is there any way to do it?

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

No branches or pull requests

5 participants