[Mapserver-users] Nothing raster (tiff,jpeg) comes out

Vincent Schut schut at sarvision.com
Thu Aug 7 07:41:27 PDT 2003


Zainal,

what type of tiff do you have?
Mapserver 3.x or Mapserver 4.0 but without GDAL will only accept 8-bit 
color-indexed tiffs. If you have gdal, you can try to run 'gdalinfo 
KLRaster.tif'. This should give you info on the type. If there appear to be 3 
bands, it's the wrong type and you'll have to convert it.

Cheers,
Vincent.

On Thursday 07 August 2003 16:36, zainal A Majeed wrote:
> Dear Vincent and all,
>
> Sorry that I miss to reply to all.
> Either you put it as DEFAULT or ON it gave the same result. But when I use
> the tutorial data 'shdrlfi020g_ugl.tif' it works fine.
>
> Hi Brock,
> I have a peek at your problem in early July. I appreciate if you could wrap
> up my problem with your solution if any. The difference is that you have a
> small vertical line but for me no image at all.
>
> Your thought is very much obliged
>
> Zainal
>
> >===== Original Message From Vincent Schut <schut at sarvision.com> =====
> >Zainal,
> >
> >please please if you respond to a message on the mailing list or to a
>
> response
>
> >on your message on the list, also send your response to the list! This
> >enables other list members to add their knowledge and/or to learn from the
> >discussion.
> >
> >To answer your question: you either have to set status to 'default'
> > instead
>
> of
>
> >'on', or add '&layer=KLRaster' to your url.
> >When using mapserver as a cgi, status 'on' means the layer is available
> > for rendering, but you still have to request the actual rendering in the
> > url. Status 'default' means the layer gets rendered always. Status 'off'
> > means the layer will not be available, even not if you explicitly request
> > it in your url.
> >I know this is documented poorly.
> >
> >If one of the documentation maintainers reads this, maybe you could add it
> > to the FAQ or another appropriate place where every beginning mapserver
> > user should read it...?
> >And maybe also in the mapfile documentation. The STATUS explanation reads
> >exactly one line and is not particularly helpfull...
> >
> >Cheers,
> >Vincent.
> >
> >On Wednesday 06 August 2003 11:10, zainal A Majeed wrote:
> >> Dera Vinbcent,
> >>
> >> Responding to your first para, thanks for the tips, it would help in my
> >> research.
> >>
> >> To the second para, yes, I am initially just trying to display normal
> >> raster jpg and tiff (with no world file, do not have geocode info, pixel
> >> 2772 X 2979) by using mapserver with a simple map file as below:
> >>
> >> NAME KLPhoto
> >> EXTENT 0 0 2772 2979
> >> SIZE 400 300
> >> SHAPEPATH "/webgis/malaysia/kl/geodata"
> >>
> >> LAYER
> >>   NAME "KLRaster"
> >>   DATA "BW1213L33SP298.tif"
> >>   STATUS ON
> >>   TYPE RASTER
> >>
> >> END # end of layer object
> >> END # end of map file
> >>
> >> I still have the white image. I can 'Save picture as' when I right-click
> >> on the view in IE with the query string status ‘Done’. The URL is:
> >>
> >> http://survey32/cgi-bin/mapserv.exe?mode=map&map=/webgis/malaysia/kl/map
> >>fil e/raster.map
> >>
> >> Thanks
> >>
> >> Zainal
> >>
> >> >===== Original Message From Vincent Schut <schut at sarvision.com> =====
> >> >Zainal,
> >> >
> >> >I see that you use 'status on', I do not know if this is for the entire
> >> > map thing or just in the layer. Mind that - this is tricky, I know,
> >> > many of us stumbled on it when we begun mapserving - when using
> >> > mapserver cgi, status on means that you will have to explicitly
> >> > mention the layers you want to be visible in your url request (like
> >> >http://blabla/mapserv/map=foo&mode=map&layer=oceanc&...). Status works
> >> > like this: status off means you cannot show a layer, even when
> >> > explicitly requesting it in your url. The layer is more or less
> >> > non-existent according to the mapserv process. Status on means the
> >> > layer is there and ready to be rendered *on request*. Status default
> >> > means the layer will be rendered *always*. So if you wonder why your
> >> > layer does not appear, setting status to default is always a good
> >> > thing to do. Then you know for sure that it's not the status thingy
> >> > that breakes your mapping.
> >> >
> >> >
> >> >BTW working without worldfiles when using rasters that do not have any
> >> >geocoding info inside (like normal tiff, gif, jpeg, etc) will only work
> >> > when you set your extent accordingly as an x-y projection, I think
> >> > something like 'extent 0 0 1024 800' if your image is 1024 by 800
> >> > pixels. Could be that you need to start at 1 1. As soon as you are
> >> > defining a projection, your extent will need to be in coordinates
> >> > matching that projection (and also your units), and you will need the
> >> > right coordinates with your raster files, like inside a geotiff (or
> >> > another geocoding enabled format) or using a world file (filename.wld
> >> > will do for all image file formats).
> >> >
> >> >Cheers,
> >> >Vincent.
> >> >
> >> >On Tuesday 05 August 2003 01:36, Siki Zoltan wrote:
> >> >> Hi Zainal,
> >> >>
> >> >> On Mon, 4 Aug 2003, zainal A Majeed wrote:
> >> >> > I appreciate your response. I have checked again everything as you
> >> >> > suggested. It does support raster as I tried the raster image in
> >> >> > mapserver tutorial all this while.
> >> >> > I am using .tiff and convert to .img after image proceesing then to
> >> >> > .jpg. I don’t need World file for the time being.
> >> >>
> >> >> If you don't have gdal installed you can use only 256 colors!
> >> >> Convert your image to 256 color palette if it has more colors.
> >> >>
> >> >> I have never used images without world file, I think you must have
> >> >> world file or geotiff.
> >> >> The world file is an ascii file you can easy create it. A world file
> >> >> consist of 6 lines, each line contains a single value.
> >> >> 1st line: pixel size in x direction in meters (or foot or ...)
> >> >> 2nd line: 0 if the coordinate system paralel to the image
> >> >> 3rd line: 0 if the coordinate system paralel to the image
> >> >> 4th line: -pixel size in y direction in meter (negativ value)
> >> >> 5th line: easting for upper left corner
> >> >> 6th line: northing for upper left corner
> >> >> What extents do you specify in the map file without a world file?
> >> >>
> >> >> > The status is ON and when display in IE I can right click to copy
> >> >> > to wall paper or desktop background but it’s invisible (white
> >> >> > image).
> >> >>
> >> >> Yeh, you got an empty image from the mapserver.
> >> >>
> >> >> Do you have a html template? If yes, then you can can check mapext
> >> >> cgi variable inserting [mapext] somewhere in the html code.
> >> >>
> >> >> Have you read raster-howto?
> >> >> Visit the galery to get idea.
> >> >> Finally insert your map and template file into your mail.
> >> >>
> >> >> Hi
> >> >> Zoltan
> >> >>
> >> >> > >===== Original Message From Siki Zoltan <siki at bme-geod.agt.bme.hu>
> >> >> > > ===== Dear Zainal,
> >> >> > >
> >> >> > >You gave us few details, so I can make only suggestions.
> >> >> > >
> >> >> > >Does mapserver support the used raster format?
> >> >> > >Check mapserv -v
> >> >> > >
> >> >> > >Do you have world file along with your raster image?
> >> >> > >If you have GeoTiff no need for world file.
> >> >> > >See Raster howto at mapserver.gis.umn.edu/doc36/raster-howto.html
> >> >> > >
> >> >> > >What is the status of the layer?
> >> >> > >If it is ON then you will see it if you specify the layer name in
> >> >> > > the query string e.g.
> >> >> > >www.somewhere/cgi-bin/mapserv?map=your_map_file&layer=layer_name
> >> >> > >
> >> >> > >Does the extent of the map and the raster fits?
> >> >> > >
> >> >> > >If these don't help give us more information.
> >> >> > >
> >> >> > >Hi,
> >> >> > >Zoltan Siki
> >> >> > >
> >> >> > >On Fri, 18 Jul 2003, zainal A Majeed wrote:
> >> >> > >> Dear friends,
> >> >> > >>
> >> >> > >> I hope this is not a repetition. I try to map out with mapsever
> >> >> > >> raster
> >> >> >
> >> >> > aerial
> >> >> >
> >> >> > >> photo from map file. The connection to mapserver was alright but
> >> >> > >> nothing
> >> >> >
> >> >> > comes
> >> >> >
> >> >> > >> out in view except white window(there is an image but white -
> >> >> > >> can't see). Can anybody tell what is the problem?
> >> >> > >>
> >> >> > >> Thanks and cheers
> >> >> > >>
> >> >> > >> Zainal
> >> >> > >>
> >> >> > >> ZAINAL A MAJEED
> >> >> > >> PhD in Web Technology and Internet GIS
> >> >> > >> School of Civil Engineering and Geosciences
> >> >> > >> Bedson BUilding, University of Newcastle upon Tyne
> >> >> > >> Newcastle upon-Tyne NE1 7RU
> >> >> > >> United Kingdom
> >> >> > >>
> >> >> > >> Tel: +44 (0)191 222 6357
> >> >> > >> Fax: +44 (0)191 222 8691
> >> >> > >> email: zainal.abdul-majeed at ncl.ac.uk
> >> >> > >> web: http://www.cegs.ncl.ac.uk
> >> >> > >> web: http://geomatics.ncl.ac.uk
> >> >> > >> *************************************
> >> >> > >> Home:
> >> >> > >> 178 Dilston Road,
> >> >> > >> Newcastle Upon Tyne NE4 5AD
> >> >> > >> United Kingdom
> >> >> > >> Phone  : +44 (0) 191-2727259
> >> >> > >> Mobile : +44 (0) 796-0938952
> >> >> > >>
> >> >> > >> _______________________________________________
> >> >> > >> Mapserver-users mailing list
> >> >> > >> Mapserver-users at lists.gis.umn.edu
> >> >> > >> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> >> >>
> >> >> _______________________________________________
> >> >> Mapserver-users mailing list
> >> >> Mapserver-users at lists.gis.umn.edu
> >> >> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> >> >
> >> >--
> >> >______________________________________
> >> >Vincent Schut
> >> >Sarvision B.V.
> >> >Wageningen, The Netherlands
> >> >www.sarvision.com
> >
> >--
> >______________________________________
> >Vincent Schut
> >Sarvision B.V.
> >Wageningen, The Netherlands
> >www.sarvision.com

-- 
______________________________________
Vincent Schut
Sarvision B.V.
Wageningen, The Netherlands
www.sarvision.com




More information about the MapServer-users mailing list