[Gdal-dev] problem with netcdf file and mercator projection

NicoSIG nicolasgabarron at yahoo.fr
Fri Jul 21 09:38:16 EDT 2006


Hello,

I'm working with mapserver and netcdf files.

I've two layers in my mapfile :
- a shapefile of the countries (projection latlong WGS84)
- a netcdf file (projection mercator)

here is my mapfile :

MAP
  NAME "demo"
  STATUS ON
  SIZE 800 600
  EXTENT -20037508 -12880000 20037508 17000000
  UNITS meters
  IMAGETYPE     png

  PROJECTION
      "proj=merc"
    "ellps=WGS84"
  END

  LAYER
    NAME "monde"
    DATA
"/home7/gromeo/users/ngabarro/GABARRON/Data_test/Shapefile/Cntry00.shp"
    STATUS   DEFAULT
    TYPE     LINE
    TRANSPARENCY 50

    PROJECTION
#            "+proj=merc"
        "+proj=latlong +datum=WGS84"
    END

    CLASS
      COLOR  0 0 250
    END

  END

  LAYER
     NAME "coriolis"
     DATA
'NETCDF:"/home/alboran/logiciels/apache/htdocs/mtreguer/cartoweb3/projects/sextant_test/server_conf/sextant/data/OA_20050518.nc":temperature'
     TYPE RASTER
     STATUS DEFAULT
#     EXTENT -179.5 -77.01048 180 77.01048
#      UNITS DD

     EXTENT -19981848.60 -13817585.23 20037708.34 13817585.23
     UNITS METERS

     PROJECTION
#    "proj=merc"
     "+proj=latlong"
    END

   CLASS
     NAME "C1"
      EXPRESSION ([pixel] < 20000)
      COLOR 255 0 0
   END

  END

END


If I write netcdf layer with "proj=merc", the layer doesn't appear.
If I write netcdf layer with "proj=latlong", the layer appear, but he
doesn't match with the shapefile layer (see attachment img_netcdf.jpg).
If I write EXTENT with degrees, it doesn't change.

what's the problem ?

Thanks for your help,

Best Regards, 

http://www.nabble.com/user-files/68/img_netcdf.jpg 
http://www.nabble.com/user-files/68/img_netcdf.jpg 
-- 
View this message in context: http://www.nabble.com/problem-with-netcdf-file-and-mercator-projection-tf1980293.html#a5433800
Sent from the GDAL - Dev forum at Nabble.com.




More information about the Gdal-dev mailing list