Hi David, Thanks for your reply !
Even if I simplify the map file to the following below, I still get empty image ... I am very confused here ... MAP #IMAGETYPE JPEG # "minx miny maxx maxy" EXTENT 3366307.654280 5813354.151378 3367797.654280 5814955.151378 SIZE 640 480 #SHAPEPATH "/home/oz/demo/data" IMAGECOLOR 255 255 255 FONTSET "/home/oz/safira/Safira2/trunk/Safira2/DATA/fonts/fonts.list" ##################################### # Background color for the map canvas -- change as desired #if another color uncomment #IMAGECOLOR 192 192 192 IMAGEQUALITY 100 IMAGETYPE jpeg OUTPUTFORMAT NAME jpeg DRIVER 'GD/JPEG' MIMETYPE 'image/jpeg' IMAGEMODE PC256 EXTENSION 'jpeg' END # Legend LEGEND STATUS embed #IMAGECOLOR 255 255 255 POSITION ll #STATUS ON KEYSIZE 10 10 LABEL TYPE truetype FONT "arial" COLOR 0 0 0 SIZE 8 ANTIALIAS true END END ### SCALEBAR SCALEBAR #ALIGN center INTERVALS 4 POSITION ul #ur SIZE 200 10 #Black bounding box OUTLINECOLOR 0 0 0 STATUS embed UNITS kilometers LABEL TYPE truetype FONT "arial" COLOR 0 0 0 SIZE 8 ANTIALIAS true END END LAYER NAME 'W_PCE_in_GW' TYPE RASTER DATA '/home/oz/safira/Safira2/trunk/Safira2/SzenarioA/ScALayout1/W_PCE_in_GW.asc' STATUS ON CLASSITEM "[pixel]" MAXSCALE 500000 CLASS NAME "NO DATA" EXPRESSION (([pixel] == -9999)) COLOR 0 0 255 STYLE #SYMBOL 0 #SIZE 4 #OUTLINECOLOR 0 0 255 #COLOR 243 162 0 END END CLASS NAME "0 - 5" EXPRESSION (([pixel] >= 0 AND ([pixel] <=5)) COLOR 200 0 0 STYLE SYMBOL 0 SIZE 2 OUTLINECOLOR 0 0 0 #COLOR 243 162 0 END END CLASS NAME "5 - 10" EXPRESSION (([pixel] > 10 AND [pixel] <=20)) COLOR 243 162 0 END CLASS NAME "2 - 50" EXPRESSION (([pixel] > 20 AND [pixel] <=50)) COLOR 0 200 0 END #TRANSPARENCY 100 END END On Thu, Apr 8, 2010 at 5:27 PM, Fawcett, David (MPCA) <david.fawc...@state.mn.us> wrote: > Oz, > > In looking at your layer definition, you have defined a layer extent in > coordinates that don't appear to match the spatial reference system you have > defined for that layer in the projection block. > > It looks like you have meters or feet in your extent and the units for the > projection that you have defined are decimal degrees. > > I would suggest getting rid of your layer extent unless you really need it. > Make sure that the projection that you have defined in your layer matches the > projection of your data. > > At the map level (you didn't include this part of the map file), make sure > that the units of your map extent match the projection of your map. > > The best approach is to simplify your map file as much as possible to get it > working. > > David. > > -----Original Message----- > From: mapserver-users-boun...@lists.osgeo.org > [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Oz Nahum > Sent: Thursday, April 08, 2010 9:49 AM > To: mapserver-users@lists.osgeo.org > Subject: [mapserver-users] contours in mapfile > > Hi Everyone, > > I am trying to display an ESRI ASCII Raster with map file in a contoured form. > > Despite following the documentation here: > http://mapserver.org/input/raster.html#how-are-rasters-added-to-a-map-file > I fail, and get an empty map... > > Here's is what I try in the mapfile: > > MAP > > > > #IMAGETYPE JPEG > # "minx miny maxx > maxy" > EXTENT 3366307.654280 5813354.151378 3367797.654280 5814955.151378 > SIZE 640 480 > > IMAGECOLOR 255 255 255 > FONTSET "/home/oz/safira/Safira2/trunk/Safira2/DATA/fonts/fonts.list" > > > > ##################################### > > # Background color for the map canvas -- change as desired #if another > color uncomment #IMAGECOLOR 192 192 192 IMAGEQUALITY 100 IMAGETYPE jpeg > OUTPUTFORMAT > NAME jpeg > DRIVER 'GD/JPEG' > MIMETYPE 'image/jpeg' > IMAGEMODE PC256 > EXTENSION 'jpeg' > END > > > # Legend > LEGEND > STATUS embed > #IMAGECOLOR 255 255 255 > POSITION ll > #STATUS ON > KEYSIZE 10 10 > LABEL > TYPE truetype > FONT "arial" > COLOR 0 0 0 > SIZE 8 > ANTIALIAS true > END > END > > > > ### SCALEBAR > SCALEBAR > #ALIGN center > INTERVALS 4 > POSITION ul #ur > SIZE 200 10 > #Black bounding box > OUTLINECOLOR 0 0 0 > STATUS embed > UNITS kilometers > LABEL > TYPE truetype > FONT "arial" > COLOR 0 0 0 > SIZE 8 > ANTIALIAS true > END > END > > LAYER > NAME 'W_PCE_in_GW' > TYPE RASTER > DUMP true > TEMPLATE fooOnlyForWMSGetFeatureInfo > EXTENT 3365691.535626 5813306.316297 3368142.408444 5815201.783992 > DATA > '/home/oz/safira/Safira2/trunk/Safira2/SzenarioA/ScALayout1/W_PCE_in_GW.asc' > METADATA > 'ows_title' 'W_PCE_in_GW' > END > STATUS ON > CLASSITEM "[pixel]" > #MAXSCALE 500000 > CLASS > NAME "NO DATA" > EXPRESSION (([pixel] == -9999)) > COLOR 0 0 255 > STYLE > #SYMBOL 0 > #SIZE 4 > #OUTLINECOLOR 0 0 255 > #COLOR 243 162 0 > END > END > CLASS > NAME "0 - 5" > EXPRESSION (([pixel] >= 0 AND ([pixel] <=5)) > COLOR 200 0 0 > STYLE > SYMBOL 0 > SIZE 2 > OUTLINECOLOR 0 0 0 > #COLOR 243 162 0 > END > END > CLASS > NAME "5 - 10" > EXPRESSION (([pixel] > 10 AND [pixel] <=20)) > COLOR 243 162 0 > END > CLASS > NAME "2 - 50" > EXPRESSION (([pixel] > 20 AND [pixel] <=50)) > COLOR 0 200 0 > END > > TRANSPARENCY 100 > PROJECTION > 'proj=longlat' > 'ellps=WGS84' > 'datum=WGS84' > 'no_defs' > END > END > > > > END > > I also attach the raster file as zip. > > Can someone tell me what am I doing wrong ? > > Thanks in advance ! > > Oz Nahum > Graduate Student > Zentrum für Angewandte Geologie > Universität Tübingen > -- Oz Nahum Graduate Student Zentrum für Angewandte Geologie Universität Tübingen --- Imagine there's no countries it isn't hard to do Nothing to kill or die for And no religion too Imagine all the people Living life in peace _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users