<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello list,<br>
Some time ago I posted a problem about reprojection using mapscript. I
"solved" it sort of say, and I think that this note can help users as
well as developers.<br>
<br>
To reassume:<br>
I had a map projection and a layer in another projection. Mapserver
perfectly uses the GRIDS in the projection information of the layer
when it draws, but it did NOT use them when calling the mapscript
function project( projectionObj proj_in, projectionObj proj_out ) .&nbsp;
The answer is that the "null" keyword gave the incorrect reprojection.
Deleting the ",null" string and leaving only the name of the grid file
will work fine.<br>
<pre style="margin: 0em;">INCORRECT
"nadgrids=lombardia_tot.gsb,null"</pre>
CORRECT<br>
<pre style="margin: 0em;">"nadgrids=lombardia_tot.gsb"</pre>
<br>
<pre style="margin: 0em;">*main project projection*
  PROJECTION
    "proj=utm"
    "zone=32"
    "ellps=WGS84"
    "datum=WGS84"
    "units=m"
    "no_defs"
  END
*layer projection*
    PROJECTION
      "proj=tmerc"
      "lat_0=0"
      "lon_0=9"
      "k=0.9996"
      "x_0=1500000"
      "y_0=0"
      "ellps=intl"
      "units=m"
      "no_defs"
      "nadgrids=lombardia_tot.gsb,null"
    END
</pre>
<br>
<br>
<div class="moz-signature">-- <br>
<font face="Arial, Helvetica, sans-serif" size="-1"><b>Francesco Pirotti</b>
<br>
Dep. TESAF <br>
CIRGEO &#8211; Interdepartmental Research Center on Cartography
Photogrammetry <br>
Remote Sensing and G.I.S. <br>
University of Padova <br>
Web: <a href="http://www.cirgeo.unipd.it/cirgeo/francescopirotti.htm">http://www.cirgeo.unipd.it/cirgeo/francescopirotti.htm</a>
<br>
Email: <a href="mailto:francesco.pirotti@unipd.it">francesco.pirotti@unipd.it</a>
<br>
Phone: +39 049 827 2710 <br>
Phone: +39 349 55 39 261
<p><br>
</p>
</font></div>
</body>
</html>