[ms4w-users] Cannot display raster: MS4W shows white rectangle instead.

kreshna_iceheart at yahoo.com kreshna_iceheart at yahoo.com
Sun Jun 8 22:06:52 EDT 2008


Thank you Jeff, but it turned out to be STATUS ON phenomena. Once I changed status to DEFAULT, I can display the raster perfectly (Duh!).

I still wonder though: this is the very first time I experienced the STATUS ON phenomena. I used STATUS ON quite frequently in the past with vector data and never experienced any problem --why does it become problematic with raster data?

I still have some other questions if you don't mind:

(1) You mentioned about making sure that the corner coordinates in that gdalinfo response are valid. What kind of corner coordinates could be invalid? See, I have another raster named GABUNGAN.tif, which I still fail to display (even with STATUS DEFAULT). The gdalinfo result is as follows:
C:\ms4w\tools\gdal-ogr-utils>gdalinfo C:\mapfiles\shp\RASTER\GABUNGAN.tif
Driver: GTiff/GeoTIFF
Size is 14307, 11632
Coordinate System is:
PROJCS["unnamed",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.2572235630016,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",111],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",10000000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","32749"]]
Origin = (572639.482510,9112580.054120)
Pixel Size = (0.55205479,-0.55205479)
Corner Coordinates:
Upper Left  (  572639.483, 9112580.054)
Lower Left  (  572639.483, 9106158.553)
Upper Right (  580537.730, 9112580.054)
Lower Right (  580537.730, 9106158.553)
Center      (  576588.606, 9109369.303)
Band 1 Block=14307x1 Type=Byte, ColorInterp=Red
Band 2 Block=14307x1 Type=Byte, ColorInterp=Green
Band 3 Block=14307x1 Type=Byte, ColorInterp=Blue

The coordinates above are not invalid, are they?


(2) The EXTENT parameter in mapfile does not have to be exactly the same with the corner coordinates of the raster, does it? As long as it covers the raster coordinates, then I should be fine, am I correct?

Sorry if my questions sound stupid but I'm indeed a newbie in dealing with raster data :-D

Thanks again,
-Kresh


--- On Fri, 6/6/08, Jeff McKenna <jmckenna at gatewaygeomatics.com> wrote:

> From: Jeff McKenna <jmckenna at gatewaygeomatics.com>
> Subject: Re: [ms4w-users] Cannot display raster: MS4W shows white rectangle instead.
> To: "ms4w-users" <ms4w-users at lists.maptools.org>
> Date: Friday, June 6, 2008, 3:46 PM
> Kresh,
> 
> I would try using the gdalinfo.exe utility with your
> 'industri.tif'  
> file (after you execute setenv.bat first).  Make sure the
> corner  
> coordinates in that gdalinfo response are valid, and then
> use those  
> coordinates for your EXTENT parameter in your mapfile.
> 
> (since it is the GDAL library that is used to access
> rasters in  
> MapServer, it's always good to start with the GDAL
> utilities)
> 
> --jeff
> 
> 
> 
> 
> ---
> Jeff McKenna
> FOSS4G Consulting and Training Services
> http://www.gatewaygeomatics.com/
> 
> 
> 
> 
> 
> On 6-Jun-08, at 3:36 AM, kreshna_iceheart at yahoo.com wrote:
> 
> > 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
> >
> >
> 
> _______________________________________________
> ms4w-users mailing list
> ms4w-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ms4w-users


      


More information about the ms4w-users mailing list