Hello All,<br>
<br>
I have been having problems displaying raster imagery from web mapping
services in MapServer/Chameleon (poor visual resolution,
essentially). I first sought help from the MapServer list (pasted
below), but have discovered that I likely need Chameleon help.<br>
<br>
Specifically, I am wondering how I can specify that 24bit output be generated from a layer in a web mapping context.<br>
<br>
In addition to the responses below, Frank Warmerdam also suggested
adding PROCESSING "DITHER=YES" to the mapfile if I do not specify jpeg
or png24 in the mapfile output. This did help somewhat. But
again, the problem is that I cannot refer to a mapfile in an xml
context file (as far as I know). So, there must be some other
means in Chameleon of specifying that the output is 24bit rather than
8bit.<br>
<br>
I am grateful for any hints or ideas you can offer!<br>
<br>
Thanks!<br>
<br>
Jennifer Zeisloft<br>
UW Sea Grant<br>
<br>
------------------------------------------------------------------------------------------------------------------<br>
>From the MapServer List Discussion:<br>
<br>
Greetings All,<br>
<br>
We have been noticing that some (but not all) WMS raster images look
pretty terrible (extremely low resolution compared to what they should
be) when added to our MapServer application. For instance, from
TerraServer (<a href="http://terraservice.net/ogcmap.ashx">http://terraservice.net/ogcmap.ashx</a>), USGS Digital Ortho
Quads are virtually useless regardless of scale, while USGS DRGs look
decent. Daily MODIS imagery from NASA JPL World Map Service
(<a href="http://wms.jpl.nasa.gov/wms.cgi?">http://wms.jpl.nasa.gov/wms.cgi?</a>) has also typically been a
problem. And there are others...<br>
<br>
I have recently been playing with GDAL to display our own rasters, but
also partially with the hope that it might somehow magically fix this
problem (of course it hasn't).<br>
<br>
I am wondering whether the display problem is local or if it is on the
data custodian's end, and whether this is typically the case. Is
there any way to correct it? If it is at the custodial end, what
might be done differently to increase the display resolution for WMS
clients (so that we don't make the same mistake)?<br>
<br>
I really appreciate any hints or ideas you can offer.<br>
<br>
Thanks much!<br>
<br>
Jennifer Zeisloft<br>
UW Sea Grant<br>
<br>
------------------------<br>
Jennifer -<br>
<br>
You don't give us much information to go on, other than your dislike of the results!<br>
<br>
If you're consistently seeing poor-quality results, then there may well
be something systematic you're doing in your map files or MapServer
configuration. I'm assuming you're using MapServer to generate
these "horrible-looking" images. If you are, for example,
requesting low-color output from high-color images, you're going to see
blotchy output. DRGs are low-color images (only 13 unique colors)
so they are not as prone to being affected by a low-color output
request.<br>
<br>
Could you provide an example of the map file and configuration you're
using to retrieve and display these images? There's nothing
special about the WMS interface that inherently limits image quality -
you can get a perfect reproduction of the source imagery in many cases.<br>
<br>
- Ed<br>
<br>
Ed McNierney<br>
President and Chief Mapmaker<br>
TopoZone.com / Maps a la carte, Inc.<br>
73 Princeton Street, Suite 305<br>
North Chelmsford, MA 01863<br>
Phone: +1 (978) 251-4242<br>
Fax: +1 (978) 251-1396<br>
<a href="mailto:ed@topozone.com">ed@topozone.com</a> <br>
<br>
--------------------------------------<br>
Thank you for responding, Ed. <br>
<br>
Actually, these raster data sets are displayed as part of Chameleon
contexts (so there is no mapfile). I added the USGS orthos to a
mapfile to see if the result was any different and it wasn't (the
mapfile code for this layer is pasted below in any case).<br>
<br>
The application can be found at
<a href="http://maps.aqua.wisc.edu/lscmp/viewmaps.phtml">http://maps.aqua.wisc.edu/lscmp/viewmaps.phtml</a>. The example data
sets I am referring to can be found in the Wisconsin: Imagery context.<br>
<br>
I have read through the documentation on rasters in MapServer, as well
as searched list archives and have not been able to determine how I
would go about specifying low or high -color output. So, perhaps
this is part of the problem? <br>
<br>
Again, any suggestions are greatly appreciated!!<br>
<br>
Jennifer Zeisloft<br>
<br>
LAYER<br>
NAME DOQ<br>
STATUS ON<br>
CONNECTIONTYPE WMS<br>
TYPE RASTER<br>
CONNECTION "<a href="http://terraservice.net/ogcmap.ashx">http://terraservice.net/ogcmap.ashx</a>"<br>
PROJECTION<br>
"init=epsg:4326"<br>
END # Projection<br>
METADATA<br>
"wms_srs" "EPSG:4326"<br>
"wms_name" "DOQ"<br>
"wms_title" "USGS Digital Ortho-Quadrangles"<br>
"wms_onlineresource" "<a href="http://terraservice.net/ogcmap.ashx">http://terraservice.net/ogcmap.ashx</a>"<br>
"wms_abstract" "NA - test"<br>
"wms_keywordlist" "NA -test"<br>
"wms_server_version" "1.1.1"<br>
"wms_formatlist" "image/png,image/jpeg,image/wbmp"<br>
"wms_format" "image/png"<br>
END # Metadata<br>
END # layer<br>
<br>
-------------------------------------<br>
From: Frank Warmerdam <<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>> Mailed-By: <a href="http://lists.umn.edu">lists.umn.edu</a><br>
Reply-To: Frank Warmerdam <<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>><br>
To: <a href="mailto:MAPSERVER-USERS@lists.umn.edu">MAPSERVER-USERS@lists.umn.edu</a><br>
Date: Jan 23, 2006 10:57 PM<br>
Subject: Re: [UMN_MAPSERVER-USERS] Horrible Looking WMS Raster Imagery<br>
<br>
On 1/23/06, Brent Pedersen <<a href="mailto:bpederse@nature.berkeley.edu">bpederse@nature.berkeley.edu</a>> wrote:<br>
> have you tried using image/jpeg?<br>
<br>
In addition to fetching data from the remote WMSes as<br>
JPEG, it is also necessary for mapserver to generate 24bit<br>
output (JPEG or PNG24 for instance). I don't know how to<br>
do that with Chameleon myself, but I'm sure there is a setting<br>
somewhere.<br>
<br>
I think Ed is right that the problem is 24bit to 8bit color<br>
conversion with correspondingly poor color resolution.<br>
Given sufficient blotchiness from this conversion it can<br>
even appear that spatial resolution is degraded (though it<br>
isn't actually).<br>
<br>
Best regards,<br>
---<br>
<br>
I set the clouds in motion - turn up | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a><br>
light and sound - activate the windows | <a href="http://pobox.com/~warmerdam">http://pobox.com/~warmerdam</a><br>
and watch the world go round - Rush | Geospatial Programmer for Rent<br>
<br>
------------------------------------------------<br>
Brent,<br>
<br>
Thanks for the suggestion. I switched the output from png to jpeg
- but no change (the jpeg might have looked a little worse??).
Still, the crux of the matter is, I suppose, that these images are
displayed through a context file. The rasters are coming straight
from their "original" (perhaps) source, which doesn't allow me to
specify how the image is displayed, but merely that an image is
displayed (furthermore, the context file is automatically generated by
the "Save Context" widget in Chameleon). <br>
<br>
And an addendum to my last message: I did find output
specifications in the documentation
(<a href="http://mapserver.gis.umn.edu/docs/reference/mapfile/outputformat/">http://mapserver.gis.umn.edu/docs/reference/mapfile/outputformat/</a>),
but I don't have the opportunity in this instance to specify the output
in this sense.<br>
<br>
Jennifer<br>
<br>
-----------------------------------------------<br>
Hi Frank,<br>
<br>
Thanks for the response, Frank. It is sounding more and more like
this is a question I ought to forward to the chameleon list - because I
am also not sure how to generate 24bit output with chameleon! <br>
<br>
I appreciate the much needed direction!<br>
<br>
Thanks all!<br>
<br>
Jennifer