<div dir="ltr"><div><div>Hi,<br></div><div class="gmail_quote gmail_quote_container"><div dir="ltr"><div>I'm very confused about how 3d conversion exactly works. Especially with compound crs. The translation is from epsg:32634 to epsg:2100, with altitude translation included.<br><br>1. By default, without any specification, the translation will ignore elevation.<br><br>```<br>projinfo -s EPSG:32634 -t EPSG:2100 -o proj<br>Candidate operations found: 1<br>-------------------------------------<br>Operation No. 1:<br><br>unknown id, Inverse of UTM zone 34N + Inverse of GGRS87 to WGS 84 (1) + Greek Grid, 1 m, Greece - onshore.<br><br>PROJ string:<br>+proj=pipeline<br>  +step +inv +proj=utm +zone=34 +ellps=WGS84<br>  +step +proj=push +v_3<br>  +step +proj=cart +ellps=WGS84<br>  +step +proj=helmert +x=199.87 +y=-74.79 +z=-246.62<br>  +step +inv +proj=cart +ellps=GRS80<br>  +step +proj=pop +v_3<br>  +step +proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80<br>```<br><br>2. With --3d, the translation will include elevation<br><br>```<br>projinfo -s EPSG:32634 -t EPSG:2100 -o proj --3d<br>Candidate operations found: 1<br>-------------------------------------<br>Operation No. 1:<br><br>unknown id, Inverse of UTM zone 34N + Inverse of GGRS87 to WGS 84 (1) + Greek Grid, 1 m, Greece - onshore.<br><br>PROJ string:<br>+proj=pipeline<br>  +step +inv +proj=utm +zone=34 +ellps=WGS84<br>  +step +proj=cart +ellps=WGS84<br>  +step +proj=helmert +x=199.87 +y=-74.79 +z=-246.62<br>  +step +inv +proj=cart +ellps=GRS80<br>  +step +proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80<br>```<br><br>This is the expected translation with altitude<br><br>```<br>echo 21 38 0 | cct +proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=deg +z_in=m +xy_out=rad +z_out=m +step +proj=cart +ellps=WGS84 +step +proj=helmert +x=199.87 +y=-74.79 +z=-246.62 +step +inv +proj=cart +ellps=GRS80 +step +proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80<br>1965754.3416   2386940.5077       15.6793           inf<br>```<br><br>3. I tested by creating wkt with 3rd(up) axis, which also matches with 2<br><br>```<br>PROJCRS["GGRS87 / Greek Grid",<br>    BASEGEOGCRS["GGRS87",<br>        DATUM["Greek Geodetic Reference System 1987",<br>            ELLIPSOID["GRS 1980",6378137,298.257222101,<br>                LENGTHUNIT["metre",1]],<br>            ID["EPSG",6121]],<br>        PRIMEM["Greenwich",0,<br>            ANGLEUNIT["degree",0.0174532925199433],<br>            ID["EPSG",8901]]],<br>    CONVERSION["Greek Grid",<br>        METHOD["Transverse Mercator",<br>            ID["EPSG",9807]],<br>        PARAMETER["Latitude of natural origin",0,<br>            ANGLEUNIT["degree",0.0174532925199433],<br>            ID["EPSG",8801]],<br>        PARAMETER["Longitude of natural origin",24,<br>            ANGLEUNIT["degree",0.0174532925199433],<br>            ID["EPSG",8802]],<br>        PARAMETER["Scale factor at natural origin",0.9996,<br>            SCALEUNIT["unity",1],<br>            ID["EPSG",8805]],<br>        PARAMETER["False easting",500000,<br>            LENGTHUNIT["metre",1],<br>            ID["EPSG",8806]],<br>        PARAMETER["False northing",0,<br>            LENGTHUNIT["metre",1],<br>            ID["EPSG",8807]],<br>        ID["EPSG",19930]],<br>    CS[Cartesian,3],<br>        AXIS["(E)",east,<br>            ORDER[1],<br>            LENGTHUNIT["metre",1,<br>                ID["EPSG",9001]]],<br>        AXIS["(N)",north,<br>            ORDER[2],<br>            LENGTHUNIT["metre",1,<br>                ID["EPSG",9001]]],<br>        AXIS["ellipsoidal height (h)",up,<br>            ORDER[3],<br>            LENGTHUNIT["metre",1,<br>                ID["EPSG",9001]]],<br>    USAGE[<br>        SCOPE["unknown"],<br>        AREA["Greece - onshore."],<br>        BBOX[34.88,19.57,41.75,28.3]],<br>    REMARK["Promoted to 3D from EPSG:2100"]]<br>```<br><br>```<br>PROJCRS["WGS 84 / UTM zone 34N",<br>    BASEGEOGCRS["WGS 84",<br>        ENSEMBLE["World Geodetic System 1984 ensemble",<br>            MEMBER["World Geodetic System 1984 (Transit)"],<br>            MEMBER["World Geodetic System 1984 (G730)"],<br>            MEMBER["World Geodetic System 1984 (G873)"],<br>            MEMBER["World Geodetic System 1984 (G1150)"],<br>            MEMBER["World Geodetic System 1984 (G1674)"],<br>            MEMBER["World Geodetic System 1984 (G1762)"],<br>            MEMBER["World Geodetic System 1984 (G2139)"],<br>            ELLIPSOID["WGS 84",6378137,298.257223563,<br>                LENGTHUNIT["metre",1]],<br>            ENSEMBLEACCURACY[2.0]],<br>        PRIMEM["Greenwich",0,<br>            ANGLEUNIT["degree",0.0174532925199433]],<br>        ID["EPSG",4979]],<br>    CONVERSION["UTM zone 34N",<br>        METHOD["Transverse Mercator",<br>            ID["EPSG",9807]],<br>        PARAMETER["Latitude of natural origin",0,<br>            ANGLEUNIT["degree",0.0174532925199433],<br>            ID["EPSG",8801]],<br>        PARAMETER["Longitude of natural origin",21,<br>            ANGLEUNIT["degree",0.0174532925199433],<br>            ID["EPSG",8802]],<br>        PARAMETER["Scale factor at natural origin",0.9996,<br>            SCALEUNIT["unity",1],<br>            ID["EPSG",8805]],<br>        PARAMETER["False easting",500000,<br>            LENGTHUNIT["metre",1],<br>            ID["EPSG",8806]],<br>        PARAMETER["False northing",0,<br>            LENGTHUNIT["metre",1],<br>            ID["EPSG",8807]],<br>        ID["EPSG",16034]],<br>    CS[Cartesian,3],<br>        AXIS["(E)",east,<br>            ORDER[1],<br>            LENGTHUNIT["metre",1,<br>                ID["EPSG",9001]]],<br>        AXIS["(N)",north,<br>            ORDER[2],<br>            LENGTHUNIT["metre",1,<br>                ID["EPSG",9001]]],<br>        AXIS["ellipsoidal height (h)",up,<br>            ORDER[3],<br>            LENGTHUNIT["metre",1,<br>                ID["EPSG",9001]]],<br>    USAGE[<br>        SCOPE["unknown"],<br>        AREA["Between 18°E and 24°E, northern hemisphere between equator and 84°N, onshore and offshore. Albania. Belarus. Bosnia and Herzegovina. Bulgaria. Central African Republic. Chad. Croatia. Democratic Republic of the Congo (Zaire). Estonia. Finland. Greece. Hungary. Italy. Kosovo. Latvia. Libya. Lithuania. Montenegro. North Macedonia. Norway, including Svalbard and Bjornoys. Poland. Romania. Russian Federation. Serbia. Slovakia. Sudan. Sweden. Ukraine."],<br>        BBOX[0,18,84,24]],<br>    REMARK["Promoted to 3D from EPSG:32634"]]<br>```<br><br>```<br>projinfo -s 'PROJCRS["GGRS87 / Greek Grid",BASEGEOGCRS["GGRS87",DATUM["Greek Geodetic Reference System 1987",ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1]],ID["EPSG",6121]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8901]]],CONVERSION["Greek Grid",METHOD["Transverse Mercator",ID["EPSG",9807]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",24,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",19930]],CS[Cartesian,3],AXIS["(E)",east,ORDER[1],LENGTHUNIT["metre",1,ID["EPSG",9001]]],AXIS["(N)",north,ORDER[2],LENGTHUNIT["metre",1,ID["EPSG",9001]]],AXIS["ellipsoidal height (h)",up,ORDER[3],LENGTHUNIT["metre",1,ID["EPSG",9001]]],USAGE[SCOPE["unknown"],AREA["Greece - onshore."],BBOX[34.88,19.57,41.75,28.3]],REMARK["Promoted to 3D from EPSG:2100"]]' -t 'PROJCRS["WGS 84 / UTM zone 34N",BASEGEOGCRS["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]],ID["EPSG",4979]],CONVERSION["UTM zone 34N",METHOD["Transverse Mercator",ID["EPSG",9807]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",21,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",16034]],CS[Cartesian,3],AXIS["(E)",east,ORDER[1],LENGTHUNIT["metre",1,ID["EPSG",9001]]],AXIS["(N)",north,ORDER[2],LENGTHUNIT["metre",1,ID["EPSG",9001]]],AXIS["ellipsoidal height (h)",up,ORDER[3],LENGTHUNIT["metre",1,ID["EPSG",9001]]],USAGE[SCOPE["unknown"],AREA["Between 18°E and 24°E, northern hemisphere between equator and 84°N, onshore and offshore. Albania. Belarus. Bosnia and Herzegovina. Bulgaria. Central African Republic. Chad. Croatia. Democratic Republic of the Congo (Zaire). Estonia. Finland. Greece. Hungary. Italy. Kosovo. Latvia. Libya. Lithuania. Montenegro. North Macedonia. Norway, including Svalbard and Bjornoys. Poland. Romania. Russian Federation. Serbia. Slovakia. Sudan. Sweden. Ukraine."],BBOX[0,18,84,24]],REMARK["Promoted to 3D from EPSG:32634"]]' -o proj <br>Candidate operations found: 1<br>-------------------------------------<br>Operation No. 1:<br><br>unknown id, Inverse of Greek Grid + GGRS87 to WGS 84 (1) + UTM zone 34N, 1 m, Greece - onshore.<br><br>PROJ string:<br>+proj=pipeline<br>  +step +inv +proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=0<br>        +ellps=GRS80<br>  +step +proj=cart +ellps=GRS80<br>  +step +proj=helmert +x=-199.87 +y=74.79 +z=246.62<br>  +step +inv +proj=cart +ellps=WGS84<br>  +step +proj=utm +zone=34 +ellps=WGS84<br>```<br><br>4. The EPSG:2100 is actually obtained from one gis software, it exported the 3d crs as one compound crs, essentially combined wkt of epsg:2100 and one vertical datum, but using this will give me the pipeline that ignores elevation. Matching 1<br><br>```<br>projinfo -s 'COMPD_CS["unknown",PROJCS["GGRS87 / Greek Grid",GEOGCS["GGRS87",DATUM["Greek_Geodetic_Reference_System_1987",SPHEROID["GRS 1980",6378137,298.257222101004,AUTHORITY["EPSG","7019"]],TOWGS84[-199.87,74.79,246.62,0,0,0,0],AUTHORITY["EPSG","6121"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4121"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","2100"]],VERT_CS["unknown",VERT_DATUM["unknown",2005],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Up",UP]]]' -t 'PROJCRS["WGS 84 / UTM zone 34N",BASEGEOGCRS["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]],ID["EPSG",4979]],CONVERSION["UTM zone 34N",METHOD["Transverse Mercator",ID["EPSG",9807]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",21,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",16034]],CS[Cartesian,3],AXIS["(E)",east,ORDER[1],LENGTHUNIT["metre",1,ID["EPSG",9001]]],AXIS["(N)",north,ORDER[2],LENGTHUNIT["metre",1,ID["EPSG",9001]]],AXIS["ellipsoidal height (h)",up,ORDER[3],LENGTHUNIT["metre",1,ID["EPSG",9001]]],USAGE[SCOPE["unknown"],AREA["Between 18°E and 24°E, northern hemisphere between equator and 84°N, onshore and offshore. Albania. Belarus. Bosnia and Herzegovina. Bulgaria. Central African Republic. Chad. Croatia. Democratic Republic of the Congo (Zaire). Estonia. Finland. Greece. Hungary. Italy. Kosovo. Latvia. Libya. Lithuania. Montenegro. North Macedonia. Norway, including Svalbard and Bjornoys. Poland. Romania. Russian Federation. Serbia. Slovakia. Sudan. Sweden. Ukraine."],BBOX[0,18,84,24]],REMARK["Promoted to 3D from EPSG:32634"]]' -o proj<br>Candidate operations found: 1<br>-------------------------------------<br>Operation No. 1:<br><br>unknown id, Inverse of unnamed + Transformation from GGRS87 to WGS84 + Transformation from unknown to WGS 84 (ballpark vertical transformation, without ellipsoid height to vertical height correction) + UTM zone 34N, unknown accuracy, World, has ballpark transformation<br><br>PROJ string:<br>+proj=pipeline<br>  +step +inv +proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=0<br>        +ellps=GRS80<br>  +step +proj=push +v_3<br>  +step +proj=cart +ellps=GRS80<br>  +step +proj=helmert +x=-199.87 +y=74.79 +z=246.62 +rx=0 +ry=0 +rz=0 +s=0<br>        +convention=position_vector<br>  +step +inv +proj=cart +ellps=WGS84<br>  +step +proj=pop +v_3<br>  +step +proj=utm +zone=34 +ellps=WGS84<br>```<br><br>This behavior really confuses me. Is it because the compound crs is not created the right way? I couldn't find any vertical datum/crs represenint ellipsoid height, the vert\_datum code 2005 here seems invalid VERT\_CS\["unknown",VERT\_DATUM\["unknown",2005\],UNIT\["metre",1,AUTHORITY\["EPSG","9001"\]\],AXIS\["Up",UP\]\].<br><br>And is there any simplified way to force a ellisoidal crs to be 3d? I know wgs84 has 4979 but not many other crs have such definition, like utm zone codes 326xx. And no vert\_cs for ellisoidal height. But it's quite common for me to translate between different ellipsoidal datums.<br><br>Sorry for the long texts, trying to explain the question in a clearer way. Many thanks<br clear="all"></div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr"><br><table style="font-size:14.4px;color:rgb(33,160,231)"><tbody><tr><td></td><td></td><td></td><td></td></tr></tbody></table></div></div></div></div></div></div></div><div><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><table style="font-stretch:normal;line-height:normal;font-family:Arial;font-size:initial;color:rgb(0,0,0)"><tbody><tr><td valign="top" style="padding:0px 8px 0px 0px"><a href="https://t.sidekickopen79.com/s1t/c/5/f18dQhb0S7lM8dDMPbW2n0x6l2B9nMJN7t5XWPf4Yc8W5vg7PT7dWWcgW7rw6TC11fj5b0?te=W3R5hFj4cm2zwW4mKLS-4cQh_BW4rCvKl3Fbt5S0&si=8000000000094793&pi=a0861c5c-dfb3-45c7-86f5-d3183234d987" style="color:rgb(17,85,204)" target="_blank"><img src="https://img.newoldstamp.com/p/48447" width="105" alt="photo-logo" style="display:block"></a></td><td valign="top" style="font-family:Arial;font-stretch:normal;line-height:normal;border-left:3px solid rgb(33,160,231);padding:0px 0px 0px 8px"><div style="font-size:1.2em">Thor Zhong</div><span style="font-size:12.96px">Computer Vision & AI Engineer</span><br><div style="font-size:10px;color:rgb(33,160,231);line-height:10px"> </div><div style="font-size:14.4px;white-space:nowrap"><span style="font-size:0.9em"><font color="#ff9900">Web</font> </span><a href="https://www.strayos.com/" style="color:rgb(0,0,0);font-size:0.9em" target="_blank">www.strayos.com</a><br></div><div style="font-size:14.4px;color:rgb(33,160,231);white-space:nowrap"></div><div style="font-size:10px;color:rgb(33,160,231);line-height:10px"> </div><div style="font-size:14.4px;color:rgb(33,160,231)"><div style="color:rgb(0,0,0);font-size:0.9em">Follow us</div></div><div style="font-size:5px;color:rgb(33,160,231);line-height:5px"> </div><table style="font-size:14.4px;color:rgb(33,160,231)"><tbody><tr><td><a href="https://t.sidekickopen79.com/s1t/c/5/f18dQhb0S7lM8dDMPbW2n0x6l2B9nMJN7t5XWPf4Yc8W5vg7PT7dWWcgW7rw6TC11fj5b0?te=W3R5hFj4cm2zwW3T0WGd41RkQ9W3ZTQ-j3zdyqqW3Fbt5S49hYhgW1X07J_3M0g69f3CcXQf04&si=8000000000094793&pi=a0861c5c-dfb3-45c7-86f5-d3183234d987" style="color:rgb(17,85,204);vertical-align:top" target="_blank"><img src="https://img.newoldstamp.com/i/0/0/0/0/55.png?JsH5K" width="24" alt="facebook"></a></td><td><a href="https://t.sidekickopen79.com/s1t/c/5/f18dQhb0S7lM8dDMPbW2n0x6l2B9nMJN7t5XWPf4Yc8W5vg7PT7dWWcgW7rw6TC11fj5b0?te=W3R5hFj4cm2zwW3T0WGd41RkQ9W3ZTQ-j3zdyqqW3Fbt5S49hYhgW1X07J_4fQ47l4VD0M1&si=8000000000094793&pi=a0861c5c-dfb3-45c7-86f5-d3183234d987" style="color:rgb(17,85,204);vertical-align:top" target="_blank"><img src="https://img.newoldstamp.com/i/0/0/0/0/197.png?UvuAh" width="24" alt="twitter"></a></td><td><a href="https://t.sidekickopen79.com/s1t/c/5/f18dQhb0S7lM8dDMPbW2n0x6l2B9nMJN7t5XWPf4Yc8W5vg7PT7dWWcgW7rw6TC11fj5b0?te=W3R5hFj4cm2zwW3T0WGd41RkQ9W3ZTQ-j3zdyqqW3Fbt5S49hYhgW1X07J_3ZWVWBf3K2-zv04&si=8000000000094793&pi=a0861c5c-dfb3-45c7-86f5-d3183234d987" style="color:rgb(17,85,204);vertical-align:top" target="_blank"><img src="https://img.newoldstamp.com/i/0/0/0/0/106.png?mwcs2" width="24" alt="linkedin"></a></td><td><a href="https://t.sidekickopen79.com/s1t/c/5/f18dQhb0S7lM8dDMPbW2n0x6l2B9nMJN7t5XWPf4Yc8W5vg7PT7dWWcgW7rw6TC11fj5b0?te=W3R5hFj4cm2zwW3T0WGd41RkQ9W3ZTQ-j3zdyqqW3Fbt5S49hYhgW1X07J_3P1L_X2283&si=8000000000094793&pi=a0861c5c-dfb3-45c7-86f5-d3183234d987" style="color:rgb(17,85,204);vertical-align:top" target="_blank"><img src="https://img.newoldstamp.com/i/0/0/0/0/71.png?ZaFnJ" width="24" alt="ghost"></a></td></tr></tbody></table></td></tr></tbody></table><table style="font-size:14.4px;color:rgb(33,160,231)"><tbody><tr><td></td><td></td><td></td><td></td></tr></tbody></table></div></div></div></div></div></div>