<div dir="ltr"><div dir="ltr"><div>Hi Even, <br></div><div>thanks for your feedback, very appreciated.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 16, 2020 at 4:13 PM Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div style="font-family:"monospace";font-size:9pt;font-weight:400;font-style:normal">
<p style="margin:0px;text-indent:0px">Daniele,</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">> so sorry in advance if I ask something obvious.</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">There's nothing is obvious in this area :-)</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">> Operation No. 2:</p>
<p style="margin:0px;text-indent:0px">> EPSG:9275, GHA height to EVRF2000 Austria height (1), 0.05 m, Austria</p>
<p style="margin:0px;text-indent:0px">> PROJ string:</p>
<p style="margin:0px;text-indent:0px">> Error when exporting to PROJ string: Unimplemented</p>
<p style="margin:0px;text-indent:0px">> </p>
<p style="margin:0px;text-indent:0px">> WKT2:2019 string:</p>
<p style="margin:0px;text-indent:0px">> COORDINATEOPERATION[".... long WKT here...."]</p>
<p style="margin:0px;text-indent:0px">> </p>
<p style="margin:0px;text-indent:0px">> What that PROJ Error means? Will it not be able to do the transform?</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">Yes, you need PROJ master (future 7.1.0) for that, as the mapping for Austrian vertical methods to PROJ, and the transformation of original files to GeoTIFF, has been done just recently.</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">> </p>
<p style="margin:0px;text-indent:0px">> Then, I tried combining 2DCRS + VerticalCRS:</p>
<p style="margin:0px;text-indent:0px">> </p>
<p style="margin:0px;text-indent:0px">> projinfo -s "EPSG:31255+5778" -t "EPSG:3035+9274"</p>
<p style="margin:0px;text-indent:0px">> </p>
<p style="margin:0px;text-indent:0px">> And I get again 2 candidate operations and long PROJ and WKT Strings.</p>
<p style="margin:0px;text-indent:0px">> Now, when I try cs2cs to transform a coordinate I'm getting this:</p>
<p style="margin:0px;text-indent:0px">> </p>
<p style="margin:0px;text-indent:0px">> cs2cs "EPSG:31255+5778" "EPSG:3035+9274"</p>
<p style="margin:0px;text-indent:0px">> 88000 273000 600</p>
<p style="margin:0px;text-indent:0px">> Results into:</p>
<p style="margin:0px;text-indent:0px">> *            *        inf</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">Yes, failure to transform due to the above issue.</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">With PROJ master, I now get a result, but no change in vertical value. The reason is that the point is outside of the grid (it is 45d52'39.123"N 16d50'57.28"E, but the minimum latitude of the Austrian grids is ~ 46d20'), and thus a ballpark vertical (=null) transformation is applied</p></div></blockquote><div><br></div><div>Well, when providing that coordinate, I got them from a sample Dataset in EPSG:31255 so they should be valid.</div><div><br></div><div>Weird thing:</div><div>cs2cs "EPSG:31255" "EPSG:4326"<br>88000 273000</div><div>>>>><br>45d52'39.123"N    16d50'57.28"E 0.000 (as you said)<br></div><div><br></div><div>However:<br></div><div>gdaltransform -s_srs EPSG:31255 -t_srs EPSG:4326</div><div>88000 273000</div><div>>>>><br>14.5025684938377 47.5898013589131 46.4711159374565</div><div><br></div><div>And same thing if I draw a point in QGIS: SRID=31255;POINT(88000 273000) <br></div><div>and I switch the map projection to 4326, that rendered point on the map has the same coordinates reported by gdaltransform.</div><div><br></div><div>What do you think about it?</div><div><br></div><div>Regards,</div><div>Daniele<br></div><div><br></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-family:"monospace";font-size:9pt;font-weight:400;font-style:normal">
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">> </p>
<p style="margin:0px;text-indent:0px">> Not really sure what it means. :-(</p>
<p style="margin:0px;text-indent:0px">> If I try a different vertical CRS</p>
<p style="margin:0px;text-indent:0px">> </p>
<p style="margin:0px;text-indent:0px">> cs2cs "EPSG:31255+5778" "EPSG:3035+5621"</p>
<p style="margin:0px;text-indent:0px">> 88000 273000 600</p>
<p style="margin:0px;text-indent:0px">> Results into:</p>
<p style="margin:0px;text-indent:0px">> 2553923.81 4852657.42 600.00</p>
<p style="margin:0px;text-indent:0px">> </p>
<p style="margin:0px;text-indent:0px">> So, at least the 2D coordinates get properly transformed but the elevation</p>
<p style="margin:0px;text-indent:0px">> seems unchanged, therefore I'm not sure how it works.</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">Same as above</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">> *pj_open_lib(at_bev_AT_GIS_GRID.tif): call</p>
<p style="margin:0px;text-indent:0px">> fopen(/opt/conda/pkgs/proj-data-1.0-1/share/proj/at_bev_AT_GIS_GRID.tif) -</p>
<p style="margin:0px;text-indent:0px">> succeededpj_open_lib(GV_HoehenGrid_V1.csv): call</p>
<p style="margin:0px;text-indent:0px">> fopen(/opt/conda/pkgs/proj-data-1.0-1/share/proj/GV_HoehenGrid_V1.csv) -</p>
<p style="margin:0px;text-indent:0px">> succeededpj_open_lib(GV_Hoehengrid_plus_Geoid_V3.csv): call</p>
<p style="margin:0px;text-indent:0px">> fopen(/opt/conda/pkgs/proj-data-1.0-1/share/proj/GV_Hoehengrid_plus_Geoid_V3</p>
<p style="margin:0px;text-indent:0px">> .csv) - succeededUnrecognized vertical grid formatvgridshift: could not find</p>
<p style="margin:0px;text-indent:0px">> required grid(s).Pipeline: Bad step definition: inv (failed to load datum</p>
<p style="margin:0px;text-indent:0px">> shift file)*</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">Yes, in PROJ 7.0, there's no mapping between the .csv files referenced by PROJ master and the converted GeoTIFF file.</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">> That being said, I git cloned the PROJ repo and I have a couple of</p>
<p style="margin:0px;text-indent:0px">> questions:</p>
<p style="margin:0px;text-indent:0px">> - how the vertical shift get actually computed when grid shift files are</p>
<p style="margin:0px;text-indent:0px">> available?</p>
<p style="margin:0px;text-indent:0px">> I mean, I suppose that when finding a grid_transformation entry in the EPSG</p>
<p style="margin:0px;text-indent:0px">> DB and looking for the vertical_offset_file associated to a file, it will</p>
<p style="margin:0px;text-indent:0px">> somehow load that file and use it for a kind of interpolation/pixel query</p>
<p style="margin:0px;text-indent:0px">> but I didn't figure out where this happens in the code (checking a bit the</p>
<p style="margin:0px;text-indent:0px">> vgridshift.cpp as well as coordinateoperation.cpp).</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">Addition/subtraction of the grid value, using bilinear interpolation. You spotted the right entry points. grids.cpp as well is relevant.</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">> - Does it support at the same time csv / tiffs / gtx? (If so, I didn't</p>
<p style="margin:0px;text-indent:0px">> manage to find where it eventually loads them)</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">CSV files aren't directly supported. TIFF and GTX are supported, provided that there's a mapping between the original name found in EPSG and a PROJ supported file:</p>
<p style="margin:0px;text-indent:0px"><a href="https://github.com/OSGeo/PROJ/blob/master/data/sql/grid_alternatives.sql" target="_blank">https://github.com/OSGeo/PROJ/blob/master/data/sql/grid_alternatives.sql</a></p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">Even</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">-- </p>
<p style="margin:0px;text-indent:0px">Spatialys - Geospatial professional services</p>
<p style="margin:0px;text-indent:0px"><a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a></p></div></blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Regards,</div><div dir="ltr">Daniele Romagnoli</div><div dir="ltr">==</div><div dir="ltr">GeoServer Professional Services from the experts! Visit <a href="http://goo.gl/it488V" target="_blank">http://goo.gl/it488V</a> for more information.</div><div dir="ltr">==</div><div dir="ltr"><br></div><div dir="ltr">Ing. Daniele Romagnoli</div><div dir="ltr">Senior Software Engineer</div><div dir="ltr"><br></div><div dir="ltr">GeoSolutions S.A.S.</div><div dir="ltr">Via di Montramito 3/A</div><div dir="ltr">55054  Massarosa (LU)</div><div dir="ltr">Italy</div><div dir="ltr">phone: +39 0584 962313</div><div dir="ltr">fax:      +39 0584 1660272</div><div dir="ltr"><br></div><div dir="ltr"><a href="http://www.geo-solutions.it" target="_blank">http://www.geo-solutions.it</a></div><div dir="ltr"><a href="http://twitter.com/geosolutions_it" target="_blank">http://twitter.com/geosolutions_it</a></div><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr"><span style="font-size:12.8px">-------------------------------------------------------</span></div><div dir="ltr"><span style="font-size:12.8px"><br></span></div><div dir="ltr"><span style="font-size:12.8px">Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.</span></div><div dir="ltr"><span style="font-size:12.8px"><br></span></div><div dir="ltr"><span style="font-size:12.8px">This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.</span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>