<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
I am not sure that is correct, Thomas. See the following output:
<div class=""><br class="">
</div>
<div class="">
<div class="">
<div class="">$ echo 487147.594520173 4934316.46263998 | ./cs2cs -v +proj=utm +zone=15 +to +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null</div>
<div class=""># ---- From Coordinate System ----</div>
<div class="">#Universal Transverse Mercator (UTM)</div>
<div class=""># Cyl, Sph</div>
<div class=""># zone= south</div>
<div class=""># +proj=utm +zone=15 +ellps=WGS84</div>
<div class=""># ---- To Coordinate System ----</div>
<div class="">#Mercator</div>
<div class=""># Cyl, Sph&Ell</div>
<div class=""># lat_ts=</div>
<div class=""># +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0</div>
<div class=""># +units=m +nadgrids=@null</div>
<div class="">-10370728.80 5552839.74 0.00</div>
</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">
<div class="">
<div class="">$ echo 487147.594520173 4934316.46263998 | ./cs2cs -v +proj=utm +zone=15 +datum=NAD83 +to +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m</div>
<div class=""># ---- From Coordinate System ----</div>
<div class="">#Universal Transverse Mercator (UTM)</div>
<div class=""># Cyl, Sph</div>
<div class=""># zone= south</div>
<div class=""># +proj=utm +zone=15 +datum=NAD83 +ellps=GRS80 +towgs84=0,0,0</div>
<div class=""># ---- To Coordinate System ----</div>
<div class="">#Mercator</div>
<div class=""># Cyl, Sph&Ell</div>
<div class=""># lat_ts=</div>
<div class=""># +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0</div>
<div class=""># +units=m</div>
<div class="">-10370728.80 5552839.74 0.0</div>
</div>
</div>
</div>
<div class=""><br class="">
</div>
<div class="">It seems to be the combination of +datum=NAD83 in the input system and +nadgrids=@null in the output system.</div>
<div class="">When only one (either one) of them is present the transformation is fine. They are supposed to be treated as being</div>
<div class="">the same datum, but isn’t. I have an idea where to fix this.</div>
<div class=""><br class="">
</div>
<div class="">/Kristian</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 1 Mar 2018, at 08:15, Thomas Knudsen <<a href="mailto:knudsen.thomas@gmail.com" class="">knudsen.thomas@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div class="">Actually, it seems related to handling of the null grid specificly: When using the conus grid, the 10 km jump into the lithosphere is avoided (although we get the 2D correction we ask for, but really don't want):<br class="">
<br class="">
$ echo 487147.594520173 4934316.46263998 0 | cs2cs -f %.16f %FROM% +to +proj=latlong +datun=NAD83 | cs2cs +proj=latlong +datum=NAD83 +to +proj=merc +R=6378137 +nadgrids=conus<br class="">
<br class="">
> -10370704.71 5552845.16 -0.00 <br class="">
<br class="">
</div>
Note: Height set to negative zero... not sure yet whether this is a hint<br class="">
<div class=""><br class="">
<br class="">
<br class="">
<br class="">
<br class="">
</div>
</div>
<div class="gmail_extra"><br class="">
<div class="gmail_quote">2018-03-01 7:58 GMT+01:00 Thomas Knudsen <span dir="ltr" class="">
<<a href="mailto:knudsen.thomas@gmail.com" target="_blank" class="">knudsen.thomas@gmail.com</a>></span>:<br class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" class="">
<div class="">
<div class="">
<div class="">
<div class="">
<div class="">Jeff,<br class="">
<br class="">
</div>
That's interesting (although annoying!)<br class="">
<br class="">
</div>
When I leave out the final nadgrids=@null, I get the correct result from PROJ v5RC6. Can you reproduce that?<br class="">
</div>
<br class="">
Note, I'm not implying that this should be considered a solution or workaround, merely trying to narrow in on the<br class="">
</div>
problem, which seems to be related to datum handling.<span class="HOEnZb"><font color="#888888" class=""><br class="">
<br class="">
</font></span></div>
<span class="HOEnZb"><font color="#888888" class="">/Thomas<br class="">
<div class="">
<div class="">
<div class=""><br class="">
<br class="">
<div class="">
<div class="">
<div class=""><br class="">
<br class="">
</div>
</div>
</div>
</div>
</div>
</div>
</font></span></div>
<div class="HOEnZb">
<div class="h5">
<div class="gmail_extra"><br class="">
<div class="gmail_quote">2018-03-01 0:38 GMT+01:00 Jeff McKenna <span dir="ltr" class="">
<<a href="mailto:jmckenna@gatewaygeomatics.com" target="_blank" class="">jmckenna@gatewaygeomatics.com</a><wbr class="">></span>:<br class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Update: I never heard back from anyone else about testing PROJ v5 +<br class="">
MapServer (and GDAL), so in fact I may be the only person to test this<br class="">
combination so far. Because this is a PROJ mailing list I first give<br class="">
some more feedback with PROJ utilities, then later will list results<br class="">
from other software for anyone interested. (in reality I first noticed<br class="">
the problem in MapServer but then each test in GDAL then PROJ failed as<br class="">
well, on Windows with PROJ 5.0.0-RC6)<br class="">
<br class="">
cs2cs<br class="">
=====<br class="">
<br class="">
I wanted to test PROJ v5 by using a point<br class="">
(487147.594520173,4934316.4626<wbr class="">3998) in EPSG:26915 (UTM Zone 15) and<br class="">
reprojecting that to EPSG:3857 (Google's Mercator).<br class="">
<br class="">
with PROJ 4.9.3<br class="">
---------------<br class="">
<br class="">
cs2cs -v +proj=utm +zone=15 +datum=NAD83 +to +proj=merc +a=6378137<br class="">
+b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m<br class="">
+nadgrids=@null<br class="">
# ---- From Coordinate System ----<br class="">
#Universal Transverse Mercator (UTM)<br class="">
# Cyl, Sph<br class="">
# zone= south<br class="">
# +proj=utm +zone=15 +datum=NAD83 +ellps=GRS80 +towgs84=0,0,0<br class="">
# ---- To Coordinate System ----<br class="">
#Mercator<br class="">
# Cyl, Sph&Ell<br class="">
# lat_ts=<br class="">
# +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0<br class="">
+y_0=0 +k=1.0<br class="">
# +units=m +nadgrids=@null<br class="">
487147.594520173 4934316.46263998<br class="">
<br class="">
RESULT POINT: -10370728.80 5552839.74 -0.00<br class="">
<br class="">
with PROJ 5.0.0-RC6<br class="">
-------------------<br class="">
<br class="">
>cs2cs -v +proj=utm +zone=15 +datum=NAD83 +to +proj=merc +a=6378137<br class="">
+b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m<br class="">
+nadgrids=@null<br class="">
# ---- From Coordinate System ----<br class="">
#Universal Transverse Mercator (UTM)<br class="">
# Cyl, Sph<br class="">
# zone= south<br class="">
# +proj=utm +zone=15 +datum=NAD83 +ellps=GRS80 +towgs84=0,0,0<br class="">
# ---- To Coordinate System ----<br class="">
#Mercator<br class="">
# Cyl, Sph&Ell<br class="">
# lat_ts=<br class="">
# +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0<br class="">
+y_0=0 +k=1.0<br class="">
# +units=m +nadgrids=@null<br class="">
487147.594520173 4934316.46263998<br class="">
<br class="">
RESULT POINT: -10370728.80 5522830.15 -10484.03<br class="">
<br class="">
Discussion<br class="">
----------<br class="">
<br class="">
PROJ 4.9.3 returns the correct value (I've confirmed this with many<br class="">
other tools including QGIS). Can someone explain why those 2 results<br class="">
are different? (I have reproduced this problem on Windows and also<br class="">
Ubuntu 14.94)<br class="">
<br class="">
GDAL<br class="">
====<br class="">
<br class="">
I wanted to test PROJ v5 by using that same test point (as a shapefile)<br class="">
in EPSG:26915 (UTM Zone 15) and reprojecting that to EPSG:3857 (Google's<br class="">
Mercator), using GDAL's ogr2ogr command. (data used:<br class="">
<a href="https://www.gatewaygeomatics.com/dl/parcels-proj-v5-test.zip" rel="noreferrer" target="_blank" class="">https://www.gatewaygeomatics.c<wbr class="">om/dl/parcels-proj-v5-test.zip</a> ) Below I<br class="">
have used the ogr2ogr command (included in the "commands.txt" file in<br class="">
that data download) and then ogrinfo on the reprojected file to output:<br class="">
<br class="">
with PROJ 4.9.3<br class="">
---------------<br class="">
<br class="">
POINT (-10370728.7959208 5552839.74177463)<br class="">
<br class="">
with PROJ 5.0.0-RC6<br class="">
-------------------<br class="">
<br class="">
POINT (-10370728.7959208 5522830.1464459)<br class="">
<br class="">
Discussion<br class="">
----------<br class="">
<br class="">
PROJ 4.9.3 compiled into GDAL 2.2.3 returns the correct point value, but<br class="">
returns a different point value with PROJ 5.0.0-RC6<br class="">
<br class="">
MapServer<br class="">
=========<br class="">
<br class="">
Same problems as GDAL (reprojected layer has different extents with PROJ<br class="">
5.0.0-RC6, causing problems to display the reprojected layer in a map<br class="">
image).<br class="">
<br class="">
<br class="">
If you made it this far in my long email, thanks for listening (I am<br class="">
totally stumped on this one, again ha).<br class="">
<span class="m_-1307082090562542093HOEnZb"><font color="#888888" class=""><br class="">
-jeff<br class="">
</font></span>
<div class="m_-1307082090562542093HOEnZb">
<div class="m_-1307082090562542093h5"><br class="">
<br class="">
<br class="">
<br class="">
<br class="">
On 2018-02-25 3:45 PM, Kristian Evers wrote:<br class="">
> Thanks for testing, Jeff. It is very appreciated. I hope you sort of your problems,<br class="">
> PROJ-related or not.<br class="">
><br class="">
> /Kristian<br class="">
><br class="">
>> On 25 Feb 2018, at 00:29, Jeff McKenna <<a href="mailto:jmckenna@gatewaygeomatics.com" target="_blank" class="">jmckenna@gatewaygeomatics.com</a><wbr class="">> wrote:<br class="">
>><br class="">
>> Update: it seems many things were happening, causing me to look in wrong<br class="">
>> places. But in the end MapServer was in fact reprojecting the points;<br class="">
>> what caused me total confusion was that I was testing with several<br class="">
>> MapServer-related applications that are part of MS4W (Mapbender,<br class="">
>> GeoMOOSE) and one application had a totally blank opening map image with<br class="">
>> PROJ v5. In fact for some reason the old hardcoded map extents<br class="">
>> (displayed in EPSG:3857) no longer display the data (you have to now<br class="">
>> zoom out a bit to see the data, reprojected with PROJ v5). I'll contact<br class="">
>> the GeoMOOSE team to let them dive into this (still, it could be my<br class="">
>> Windows environment, as no one else seems to be testing MapServer + PROJ<br class="">
>> v5 yet).<br class="">
>><br class="">
>> Very sorry for all this noise!<br class="">
>><br class="">
>> Short story: all is fine with RC5 here.<br class="">
>><br class="">
>> Thank you again Kristian for your passion driving this.<br class="">
>><br class="">
>> -jeff<br class="">
>><br class="">
>><br class="">
>><br class="">
>><br class="">
>><br class="">
>> On 2018-02-23 5:33 PM, Jeff McKenna wrote:<br class="">
>>> Hi Kristian,<br class="">
>>><br class="">
>>> No problems here on Windows in the MS4W environment, but I'm running<br class="">
>>> into odd errors when I have MapServer call PROJ 5<br class="">
>>> (<a href="https://lists.osgeo.org/pipermail/mapserver-dev/2018-February/015347.html" rel="noreferrer" target="_blank" class="">https://lists.osgeo.org/piper<wbr class="">mail/mapserver-dev/2018-Februa<wbr class="">ry/015347.html</a>).<br class="">
>>> Obviously an issue downstream not here, but I thought I'd at least<br class="">
>>> mention it here that I am testing RC5 as well :)<br class="">
>>><br class="">
>>> Thanks for pushing this release along.<br class="">
>>><br class="">
>>> -jeff<br class="">
>>><br class="">
>>><br class="">
>>><br class="">
>>><br class="">
>>> On 2018-02-23 3:19 PM, Kristian Evers wrote:<br class="">
>>>> All,<br class="">
>>>><br class="">
>>>> I have prepared PROJ 5.0.0RC5. Downloads are here:<br class="">
>>>><br class="">
>>>><br class="">
>>>> <a href="http://download.osgeo.org/proj/proj-5.0.0RC5.tar.gz" rel="noreferrer" target="_blank" class="">
http://download.osgeo.org/proj<wbr class="">/proj-5.0.0RC5.tar.gz</a> (<a href="http://download.osgeo.org/proj/proj-5.0.0RC5.tar.gz.md5" rel="noreferrer" target="_blank" class="">http://download.osgeo.org/pro<wbr class="">j/proj-5.0.0RC5.tar.gz.md5</a>)<br class="">
>>>> <a href="http://download.osgeo.org/proj/proj-5.0.0RC5.zip" rel="noreferrer" target="_blank" class="">
http://download.osgeo.org/proj<wbr class="">/proj-5.0.0RC5.zip</a> (<a href="http://download.osgeo.org/proj/proj-5.0.0RC5.zip.md5" rel="noreferrer" target="_blank" class="">http://download.osgeo.org/pro<wbr class="">j/proj-5.0.0RC5.zip.md5</a>)<br class="">
>>>><br class="">
>>>><br class="">
>>>> Since RC4 problems with vertical grid installation, the Horner<br class="">
>>>> transformation and faulty polygon area calculation<br class="">
>>>> in geodesic library has been fixed. Hopefully this will be the final<br class="">
>>>> release candidate. I will call for a vote for<br class="">
>>>> promotion to final release on the 27th. Unless serious issues are<br class="">
>>>> discovered in the mean time.<br class="">
>>>><br class="">
>>>> /Kristian<br class="">
>>>><br class="">
>>>><br class="">
______________________________<wbr class="">_________________<br class="">
Proj mailing list<br class="">
<a href="mailto:Proj@lists.maptools.org" target="_blank" class="">Proj@lists.maptools.org</a><br class="">
<a href="http://lists.maptools.org/mailman/listinfo/proj" rel="noreferrer" target="_blank" class="">http://lists.maptools.org/mail<wbr class="">man/listinfo/proj</a><br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
_______________________________________________<br class="">
Proj mailing list<br class="">
<a href="mailto:Proj@lists.maptools.org" class="">Proj@lists.maptools.org</a><br class="">
http://lists.maptools.org/mailman/listinfo/proj</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>