<div dir="ltr"><div><div>It could be that the old epsg file was still being used. The old (non-working) definition of 4258 was:<br><br> <4258> +proj=longlat +ellps=GRS80 +no_defs <><br><br></div>and the new (working) is:<br><br> <4258> +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs <><br><br></div>I think the problem was the missing +towgs84=0,0,0,0,0,0,0. Without that, the grid shift file was not used. And probably other things as well.<br><div><div><br>I want to continue this without reference to files as they are too variable to be reliable. Instead, I have moved everything to the command line so there is no confusion about what is in each system's files. <br><div class="gmail_extra"><br>The command:<br><br clear="all"> echo "50.792584908 5.773795547 174.9478" | \<br> cs2cs -r +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs \<br> +to +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 \<br> +x_0=155000 +y_0=463000 +ellps=bessel +nadgrids=rdtrans2008.gsb \<br> +geoidgrids=naptrans2008.gtx +units=m +no_defs -f %.4f<br><br></div><div class="gmail_extra">Now correctly provides:<br><br></div><div class="gmail_extra">182260.4500 311480.6701 129.0000<br><br></div><div class="gmail_extra">I have 'translated' this to the C API and all is working great. I have been testing with the reference points that came with the grid file.<br></div><div class="gmail_extra"><font size="1"><span style="font-family:monospace,monospace"><br></span></font></div><div class="gmail_extra"><font size="1"><span style="font-family:monospace,monospace">Texel:<br> Ref: Latitude: 53.1607530420 Longitude: 4.8247619120 Altitude: 42.861<br> Ref: Easting: 117380.120 Northing: 575040.340 Altitude: 1.000<br> Calc: Easting: 117380.120 Northing: 575040.340 Altitude: 1.000 0.000 meters from Ref<br> Inv: Latitude: 53.1607530431 Longitude: 4.8247619081 Altitude: 2455.773<br><br>Noord-Groningen:<br> Ref: Latitude: 53.4194820500 Longitude: 6.7767266740 Altitude: 42.359<br> Ref: Easting: 247380.560 Northing: 604580.780 Altitude: 2.000<br> Calc: Easting: 247380.560 Northing: 604580.780 Altitude: 2.000 0.000 meters from Ref<br> Inv: Latitude: 53.4194820513 Longitude: 6.7767266740 Altitude: 2426.971<br><br>Amersfoort:<br> Ref: Latitude: 52.1551728970 Longitude: 5.3872036570 Altitude: 43.255<br> Ref: Easting: 155000.000 Northing: 463000.000 Altitude: 0.000<br> Calc: Easting: 155000.000 Northing: 463000.000 Altitude: 0.000 0.000 meters from Ref<br> Inv: Latitude: 52.1551728982 Longitude: 5.3872036577 Altitude: 2478.331<br><br>Amersfoort 100m:<br> Ref: Latitude: 52.1551729100 Longitude: 5.3872036580 Altitude: 143.255<br> Ref: Easting: 155000.000 Northing: 463000.000 Altitude: 100.000<br> Calc: Easting: 155000.000 Northing: 463000.001 Altitude: 100.000 0.001 meters from Ref<br> Inv: Latitude: 52.1551728982 Longitude: 5.3872036577 Altitude: 8207.909<br><br>Zeeuws-Vlaanderen:<br> Ref: Latitude: 51.3686071520 Longitude: 3.3975885950 Altitude: 47.402<br> Ref: Easting: 16460.910 Northing: 377380.230 Altitude: 3.000<br> Calc: Easting: 16460.910 Northing: 377380.230 Altitude: 3.000 0.000 meters from Ref<br> Inv: Latitude: 51.3686071526 Longitude: 3.3975885974 Altitude: 2715.954<br><br>Zuid-Limburg:<br> Ref: Latitude: 50.7925849160 Longitude: 5.7737955480 Altitude: 245.948<br> Ref: Easting: 182260.450 Northing: 311480.670 Altitude: 200.000<br> Calc: Easting: 182260.450 Northing: 311480.671 Altitude: 200.000 0.001 meters from Ref<br> Inv: Latitude: 50.7925849065 Longitude: 5.7737955467 Altitude: 14091.766<br><br>Maasvlakte:<br> Ref: Latitude: 51.9473938980 Longitude: 4.0728871010 Altitude: 47.597<br> Ref: Easting: 64640.890 Northing: 440700.010 Altitude: 4.000<br> Calc: Easting: 64640.890 Northing: 440700.010 Altitude: 4.000 0.000 meters from Ref</span></font><br><font size="1"><span style="font-family:monospace,monospace"> Inv: Latitude: 51.9473938985 Longitude: 4.0728871025 Altitude: 2727.102</span></font><br><br></div><div class="gmail_extra">The Ref values are the sample points. The Calc is what I now get from proj (yeah!). The Inv is what I get when I do an inverse projection of my projected point. It is rather close to the original Ref. Except the Altitude. I am using the shift file for that as well. Maybe it does not allow an inverse on the Altitude? It is probably not a big issue for me. More of a curiosity.<br><br></div><div class="gmail_extra">I am also curious about some additional sample points that came with the grid shift data. <br><br></div><div class="gmail_extra"><font size="1"><span style="font-family:monospace,monospace">outside:<br> Ref: Latitude: 48.8430302100 Longitude: 8.7232602350 Altitude: 52.029<br> Ref: Easting: 400000.230 Northing: 100000.450 Altitude: 5.000<br><br>no_rd&geoid:<br> Ref: Latitude: 50.6874203920 Longitude: 4.6089718130 Altitude: 51.611<br> Ref: Easting: 100000.670 Northing: 300000.890 Altitude: 6.000<br><br>no_geoid:<br> Ref: Latitude: 51.1368251970 Longitude: 4.6013753610 Altitude: 50.967<br> Ref: Easting: 100000.670 Northing: 350000.890 Altitude: 6.000<br><br>no_rd:<br> Ref: Latitude: 52.4824408390 Longitude: 4.2684038890 Altitude: 49.944<br> Ref: Easting: 79000.010 Northing: 500000.230 Altitude: 7.000<br><br>edge_rd:<br> Ref: Latitude: 51.0039765320 Longitude: 3.8912478300 Altitude: 52.743<br> Ref: Easting: 50000.450 Northing: 335999.670 Altitude: 8.000</span></font><br><br></div><div class="gmail_extra">All of these fail. Since I expect our data to be within the area of the grid shift file, I guess I do not need to worry about these. Out of curiosity, how do others deal with such points?<br><br></div><div class="gmail_extra">-- <br><div class="gmail_signature">Roger Oberholtzer</div>
</div></div></div></div>