Increase Clarity of WMS

Gary Watry watry at COAPS.FSU.EDU
Mon Apr 10 05:30:04 PDT 2006


My website is 

http://gw102.coaps.fsu.edu/httpdocs/indexmaster.html

The layer code for a wms file is 

LAYER
  NAME Blue_Marble
   STATUS OFF
   TYPE RASTER
   OFFSITE 0 0 0
   GROUP "Background"
   CONNECTIONTYPE WMS
   CONNECTION "http://wms.jpl.nasa.gov/wms.cgi?"
   PROJECTION
     "init=epsg:4326"
   END
  METADATA
     "wms_name" "modis"
     "wms_server_version" "1.1.1"
     "wms_srs" "EPSG:4326"
     "wms_format" "image/png"
 END
END


If you look at it the file is real chunky or blocky, all the wms files work
the same.

Any suggestions?
______________________________________________________________
Gary L. Watry

GIS Coordinator
Center for Ocean-Atmospheric Prediction Studies
FSU / COAPS
Johnson Building, RM 215
2035 East Paul Dirac Drive
Tallahassee, Florida 32306-2840
 
E-Mail: watry at coaps.fsu.edu


-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at lists.umn.edu] On
Behalf Of Clint Johnson
Sent: Friday, April 07, 2006 7:34 PM
To: MAPSERVER-USERS at lists.umn.edu
Subject: Re: [UMN_MAPSERVER-USERS] Increase Clarity of WMS

Kyle,

Your error is due to the line that says
  PROCESSING "RESAMPLE=AVERAGE"

If you want a quality image then by all means do NOT use average dithering.
example of average dithering 
http://www.visgraf.impa.br/Courses/ip00/proj/Dithering1/average_dithering.ht
ml

Use one of:

PROCESSING "RESAMPLE=BILINEAR"
PROCESSING "RESAMPLE=BICUBIC" # preferable


Stay away from nearest and average.

Without having to go into Digital processing 101, using nearest or 
average will cause your image to "chunk" when it is re-sampled (ie 
zoomed in or out); whereas, bilinear and bicublic will give it a nice 
"anti-aliased" look as you zoom in.

Cheers,
Clint


-- 
Clint Johnson
Refractions Research Inc.
Cjohnson at refractions.net



Kyle Mulka wrote:
> Here's one of the WMS tiles I'm using. I've tried stretching it using 
> different values for the height and width but nothing I've tried has 
> made it look better or worse.
>
http://kylemulka.com/cgi-bin/mapserv?map=floorplans.map&REQUEST=GetMap&SERVI
CE=WMS&VERSION=1.1.1&LAYERS=dude-1&STYLES=&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE
&SRS=EPSG:4326&BBOX=-83.7158203125,42.2905166207974,-83.71444702148438,42.29
1532494305976&WIDTH=256&HEIGHT=256 
>
>
> -Kyle
>
> Josh Livni wrote:
>> Kyle,
>>
>> I could be wrong -- I haven't used a mapserver wms in Google Maps - 
>> but I think your mapserver image may be being squashed a bit.  It's a 
>> bit less wide relative to the height/width of your Imagemagick 
>> version. Also the gmap div seems to be a different height/width in 
>> the different versions.
>>
>> WMS will happily respond with the exact extent, but perhaps not the 
>> relative height/width you expect, thus 'squashing' the image, which 
>> may be causing the image issues you're seeing.
>>
>> You may want to play with this by adding a &height &width to the wms 
>> query, or you could try playing with the div height/width ratios, and 
>> seeing if you get similar results if one is a bit off, as I may be 
>> off-base with this theory.
>>
>>   -Josh
>>
>> Kyle Mulka wrote:
>>
>>> I have these very detailed floor plans that I'd like to georeference 
>>> and display through mapserver's WMS sever, however, the clarity of 
>>> the images degrades when it goes through. How can I increase the 
>>> clarity of these floorplans through the WMS?
>>>
>>> Here's with mapserver:
>>> http://maps.kylemulka.com/floorplan-test10.php
>>>
>>> Here's without (simply chopping up tiles using Imagemagick)
>>> http://maps.kylemulka.com/imagemagick/livedude.php
>>>
>>> Here's the parts of the map file for just the first floor:
>>> MAP
>>> NAME "UofM"
>>>   FONTSET fontset.txt
>>>   PROJECTION
>>>       "init=epsg:4326"
>>>   END
>>> IMAGETYPE png24
>>> EXTENT  -83.747063 42.272038 -83.709126 42.297056
>>> SHAPEPATH "/umdata/"
>>> LAYER
>>>   NAME "dude-1"
>>>   TYPE raster
>>>   DATA "dude1.tif"
>>>   PROCESSING "RESAMPLE=AVERAGE"
>>>   PROCESSING "DITHER=YES"
>>>     METADATA
>>>       "wms_title" "dude-1"
>>>       "wms_onlineresource" 
>>> "http://kylemulka.com/cgi-bin/mapserv?map=floorplans.map&"
>>>       "wms_srs" "EPSG:4326"
>>>   END
>>>   STATUS ON
>>> END
>>> END
>>>
>>> -Kyle
>>
>>
>>
>>
>>








More information about the MapServer-users mailing list