[mapserver-users] Cannot display raster: MapServer shows white rectangle instead of the raster.

kreshna_iceheart at yahoo.com kreshna_iceheart at yahoo.com
Fri Jun 6 05:48:46 EDT 2008


You mean the path that points to the TIFF file? The following path?
    DATA "C:\mapfiles\shp\RASTER\industri.tif"

Yup, I have checked the folder, and the path is valid.


The IMAGEPATH is as follows, by the way:
    IMAGEPATH '../../ms4w/Apache/htdocs/temp/'

I think the IMAGEPATH is valid as well, because temporary JPG files are indeed created in the folder (they're all white rectangles though).

It seems the paths are quite correct though, because I have created mapfiles with vector-only (SHPs) in the past, and they're all displayed without problems. It is the raster that problematic.

Or do I miss something?

Thanks,
-Kresh



--- On Fri, 6/6/08, David Martinez Morata <damarmo at gmail.com> wrote:

> From: David Martinez Morata <damarmo at gmail.com>
> Subject: Re: [mapserver-users] Cannot display raster: MapServer shows white rectangle instead of the raster.
> To: kreshna_iceheart at yahoo.com
> Date: Friday, June 6, 2008, 4:03 AM
> Ok, showing you files...
> The paths in your map file are defined in you Server?
> 
> 2008/6/6 kreshna_iceheart at yahoo.com
> <kreshna_iceheart at yahoo.com>:
> 
> > I just removed the IMAGECOLOR 255 255 255 line, and it
> still doesn't work.
> > MapServer still displays white rectangle instead of
> the raster. :(
> >
> > -Kresh
> >
> >
> >
> > --- On Fri, 6/6/08, David Martinez Morata
> <damarmo at gmail.com> wrote:
> >
> > > From: David Martinez Morata
> <damarmo at gmail.com>
> > > Subject: Re: [mapserver-users] Cannot display
> raster: MapServer shows
> > white rectangle instead of the raster.
> > > To: kreshna_iceheart at yahoo.com
> > > Cc: mapserver-users at lists.osgeo.org
> > > Date: Friday, June 6, 2008, 3:47 AM
> > > Hello!
> > >
> > > Maybe its your IMAGECOLOR 255 255 255
> > > In your map file
> > > Comment this with #, and test it.
> > >
> > >
> > > 2008/6/6 kreshna_iceheart at yahoo.com
> > > <kreshna_iceheart at yahoo.com>:
> > >
> > > > Is it coordinate problem or gdal problem?
> Please help.
> > > Please please help.
> > > > :(
> > > >
> > > > I am using Map Server for windows (ms4w)
> with
> > > MapServer version 4.6.1. I
> > > > created a simple mapfile to display a TIFF
> raster
> > > image named industri.tif.
> > > > The TIFF raster image has separated world
> file named
> > > industri.tfw.
> > > >
> > > > The contents of the industri.ftw is as
> follows:
> > > >      1.000
> > > >      0.000
> > > >      0.000
> > > >     -1.000
> > > >  679316.007
> > > > 9318670.876
> > > >
> > > > Meanwhile, the extent of the mapfile is as
> follows:
> > > >  EXTENT      679326.0 9317932.0 680607.0
> 9318665.0
> > > >
> > > > By comparing the two sets of coordinates
> above (.tfw
> > > contents and EXTENT
> > > > value), I think the raster should display
> properly,
> > > shouldn't it?
> > > >
> > > >
> > > > Also, below is my raster layer definition.
> There is
> > > nothing wrong with it,
> > > > isn't there?
> > > >  LAYER
> > > >    NAME Industri
> > > >     TYPE RASTER
> > > >      STATUS  ON
> > > >      DATA
> > >
> "C:\mapfiles\shp\RASTER\industri.tif"
> > > # contoh, pakai file world
> > > >    CLASS
> > > >       NAME 'Industri'
> > > >    END
> > > >  END
> > > >
> > > >
> > > > Alas, when I open the map with my browser,
> the raster
> > > does not show.
> > > > Instead, the page only show a white
> rectangle (blank
> > > rectangle?). Browsing
> > > > in map mode (&mode=map) does not help
> either. In
> > > fact, browsing in map mode
> > > > shows a big empty page.
> > > >
> > > > And when I browsed the \temp folder
> (IMAGEPATH),
> > > the resulting JPG file is
> > > > nothing but white rectangle. The size,
> however, is
> > > correct (640x400 as
> > > > specified in the mapfile), but it is a white
> rectangle
> > > instead of the raster
> > > > image.
> > > >
> > > > The temporary JPG file is attached
> > > (Industri12128218881248.jpg).
> > > >
> > > > I suspect it is a gdal problem, but my ms4w
> does
> > > support gdal, as shown
> > > > below:
> > > >
> C:\ms4w\Apache\cgi-bin>mapserv.exe -v
> > > > MapServer version 4.6.1 OUTPUT=GIF
> OUTPUT=PNG
> > > OUTPUT=JPEG OUTPUT=WBMP
> > > > OUTPUT=PDF
> > > >  OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ
> SUPPORTS=FREETYPE
> > > SUPPORTS=WMS_SERVER
> > > > SUPPO
> > > > RTS=WMS_CLIENT SUPPORTS=WFS_SERVER
> SUPPORTS=WFS_CLIENT
> > > SUPPORTS=WCS_SERVER
> > > > INPUT
> > > > =JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL
> > > INPUT=SHAPEFILE DEBUG=MSDEBUG
> > > >
> > > > I also have the following *.dll files in
> > > C:\ms4w\Apache\cgi-bin\ folder:
> > > > gdal12.dll
> > > > NCScnet.dll
> > > > NCSEcw.dll
> > > > NCSUtil.dll
> > > > xerces-c_1_6_0.dll
> > > >
> > > > So I think all the necessary *.dlls are
> complete.
> > > >
> > > > I have tried copying the *.dll above to
> > > C:\WINDOWS\System32\, but to no
> > > > avail. MapServer still displays white
> rectangle
> > > instead of the raster image.
> > > >
> > > > I have opened the TIFF raster image using
> Photoshop as
> > > well, and yes, it is
> > > > a correct raster image, not white rectangle.
> But
> > > still, MapServer displays
> > > > nothing but white rectangle.
> > > >
> > > > What should I do? What's wrong?
> MapServer 4.6.1 is
> > > capable to display
> > > > raster image, isn't it? I really need to
> display
> > > the raster image, what
> > > > should I do? Please please help. :(
> > > >
> > > > Thanks & S.O.S,
> > > > -Kresh
> > > >
> > > > PS: the mapfile and html template is
> attached
> > > >
> > > >
> > > >
> > > >
> > > >
> _______________________________________________
> > > > mapserver-users mailing list
> > > > mapserver-users at lists.osgeo.org
> > > >
> > >
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> > > >
> > > >
> >
> >
> >
> >


      


More information about the mapserver-users mailing list