[mapserver-users] PHP mapscript does not use GRID information when reprojecting rect object [solved??]

francesco francesco.pirotti at unipd.it
Thu Jun 3 13:16:50 EDT 2010


Hello list,
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.

To reassume:
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 ) .  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.

INCORRECT
"nadgrids=lombardia_tot.gsb,null"

CORRECT

"nadgrids=lombardia_tot.gsb"


*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



-- 
*Francesco Pirotti*
Dep. TESAF
CIRGEO -- Interdepartmental Research Center on Cartography Photogrammetry
Remote Sensing and G.I.S.
University of Padova
Web: http://www.cirgeo.unipd.it/cirgeo/francescopirotti.htm
Email: francesco.pirotti at unipd.it <mailto:francesco.pirotti at unipd.it>
Phone: +39 049 827 2710
Phone: +39 349 55 39 261


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100603/34e3c978/attachment.html


More information about the mapserver-users mailing list