[mapserver-users] Fwd: Examples using tiffs

Steve Lime steve.lime at dnr.state.mn.us
Sat Apr 13 12:43:21 EDT 2002


One trick we've tried is sorting the palette in the TIFFs so that the most frequent colors appear first in the palette. ERDAS Imagine was used but there must be other ways of doing this. The reason to do this stems from the way colors are allocated. Initially a pass is made through the map file and all defined colors are allocated in the map. Then colors are added as pixmap symbols are encountered and raster layers are processed. With raster layers the palette is stepped through initially and allocated in the output map. If there's no room some color matching algorithms are applied. It can make quite a difference if common colors are allocated first. If possible you should also remove colors from the palette that are not used.

Steve

Stephen Lime
Data & Applications Manager

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937
>>> <imap at chesapeake.net> 04/13/02 11:34 AM >>>

If you convert to 256 color, you arent allowing room for any other mapserver
layer colors.  I had to go down to 200 colors, to allow for layer color table
allocation.. and if you use antialiased fonts, that bitch eats up a few colors
too.  Just my 2 cents..

mapsurfer

Lowell Filak wrote:
> 
> I think there are quite a few sites out there that use tiff's. If you end up needing a sample just ask, but I think your problem may be in the data somewhere. If you have ImageMagick available do 'display <tiff_file_name>' and then Miscellany->Image Info and look under the Image: portion for colors: if it is over 256 then do 'convert -colors 256 <in_tiff_file_name> <out_tiff_file_name>'.
> We had a similar problem where our images where specified as 8-bit but were not classified down to 256 colors and the raster layer would not display. The best part about it was that we could not detect ANY visual difference between images but yet the reclassified image was 1/3 the size of the original (which was nice after starting out at 38GB).
> Hope that helps.
> Lowell F.
> 
> The following message was sent by "Steve Lime" <steve.lime at dnr.state.mn.us> on Fri, 12 Apr 2002 10:36:27 -0500.
> 
> > Received: from mail.state.mn.us
> >       (state.mn.us [156.99.125.109])
> >       by co5.dnr.state.mn.us; Fri, 12 Apr 2002 01:48:53 -0500
> > Return-Path: <bon at ivv-aachen.de>
> > Received: from aixtra1.aixtra.net by mail.state.mn.us with ESMTP for steve.lime at dnr.state.mn.us; Fri, 12 Apr 2002 01:48:52 -0500
> > Received: from [194.121.123.151] by aixtra1.aixtranet.de (NTMail 7.02.3028/NU1009.00.56ec5294) with ESMTP id necbdcaa for steve.lime at dnr.state.mn.us; Fri, 12 Apr 2002 08:48:45 +0200
> > Received: from BON01 (192.168.1.62)
> >           by mail.ivv-aachen.de with MERCUR Mailserver (v4.01.11 MTA3LTI0MzktNjY2Nw==)
> >           for <steve.lime at dnr.state.mn.us>; Fri, 12 Apr 2002 08:48:45 +0200
> > From: =?iso-8859-1?Q?Nicole_B=F6meke?= <bon at ivv-aachen.de>
> > To: <steve.lime at dnr.state.mn.us>
> > Subject: Examples using tiffs
> > Date: Fri, 12 Apr 2002 08:48:46 +0200
> > Message-Id: <000101c1e1ee$18907170$3e01a8c0 at ivvaachen.de>
> > X-Priority: 3 (Normal)
> > X-MSMail-Priority: Normal
> > X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0)
> > Importance: Normal
> > X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
> > Reply-To: bon at ivv-aachen.de
> > MIME-Version: 1.0
> > Content-Type: text/plain; charset="iso-8859-1"
> > Content-Transfer-Encoding: 8bit
> >
> >    1.)        I read about an example called landsat (that uses tiffs), but I
> > can't find a link to it anywhere.
> >             Can anybody tell me where I can get it or send a zipped copy of
> > it to my mail adress?
> >
> >    2.)     Are there other examples using tiffs available? I need a tiff and
> > a corresponding word file
> >             that is known to work with mapserver.
> >
> >    3.)        I have the problem that my tiff does not show up.
> >       It is an 8 Bit uncompressed tiff with size 600 x 600.
> >
> >       I used a world file like this:
> >       0.6
> >       0.0000000000
> >       0.0000000000
> >       -0.6
> >       400000.00
> >       5255555.00
> >
> >       To try it, I replaces the background layer of the itasca example by this
> > layer definition:
> >       LAYER
> >         NAME ctybdpy2
> >         TYPE RASTER
> >         STATUS DEFAULT
> >         DATA test.tif
> >       END
> >
> >       Has anybody an idear what I can do?
> >
> >     Thanks, Nicole.
> >
> > ----------------------------------------------------------------------------
> > ------------------------------------------------------------------
> >
> >     Nicole Bömeke
> >     IVV Aachen
> >     Germany
> >     bon at ivv-aachen.de
> >




More information about the mapserver-users mailing list