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.piro...@unipd.it <mailto:francesco.piro...@unipd.it>
Phone: +39 049 827 2710
Phone: +39 349 55 39 261


_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to