[mapserver-users] Resampling and image quality?

P Kishor punk.kish at gmail.com
Fri Mar 28 00:02:22 EDT 2008


On 3/27/08, Gregor Mosheh <gregor at hostgis.com> wrote:
> Hi, all. We're seeing some distortion in an image, a loss of viewing
>  quality, and am hoping that y'all can provide some insight into what may
>  be the issue.
>
>  Here are the URLs:
>     http://dev.geowake.com/chart.test/index.php
>     http://ms2.geowake.com/
>  Yes, it's Google Maps, but bear with me. :)
>  The "dev" one is using a PNG sliced for use in Google Maps.
>  The "ms2" one is Mapserver WMS, using the same PNG but with a worldfile
>  and without slicing since the idea here is to use WMS and save a lot of
>  work as well as being vendor-neutral.
>
>  You'll see that the "dev" one has a much "smoother" look to it. If you
>  zoom in three notches, you can read the map's title clearly. The
>  Mapserver WMS version, the text is very obviously blocky even if you
>  zoom in 4 notches. As you keep zooming in, the quality difference
>  becomes more obvious as you can read the PNG's smaller text but not the
>  WMS's.

yikes! The ms2 version is fugly.


>
>
>  So, what to do? I have tried and eliminated several possibilities, and
>  am stumped.

This sounds really silly, but have you tried with exactly the same
image in both instances? That is, not the sliced version for
MapServer, but exactly the same one you have for Google Maps?

>
>  - Source image quality; the PNGs on both sides are visually identical in
>  an image viewer. I have tried the source image in TIFF and PNG with
>  various options.
>
>  - Bad world file; the spatial extent matches that of the other map, and
>  I've checked the math repeatedly and found it A-OK
>
>  - Image format options; I have tried every image format supported, and
>  the image always comes out looking the same, so it's not interlacing
>  gone wrong, nor lossy JPEG compression, etc. The outputformat block is
>  set to generate PNG-24 RGBA, and I have verified by downloading from the
>  WMS that it is doing so.
>
>  Possibilities I've not yet exhausted:
>
>  - Resampling; using PROCESSING "RESAMPLE=AVERAGE" improved the image
>  quality but only very slightly.
>
>  - Reprojection; the images are in WGS84 (EPSG 4326) and I know that
>  Google uses their weird Mercator (54004). I added 54004 to our EPSG
>  file, and have tried various approaches such as reprojecting the image
>  to 54004 ahead of time, and using 54004's numbers in a worldfile so
>  there'd be no reprojection at all, but the effect is always the same.
>
>
>  Any ideas what's up here?
>
>  --
>  Gregor Mosheh / Greg Allensworth, BS, A+
>  System Administrator
>  HostGIS cartographic development & hosting services
>  http://www.HostGIS.com/
>
>  "Remember that no one cares if you can back up,
>   only if you can restore." - AMANDA
>  _______________________________________________
>  mapserver-users mailing list
>  mapserver-users at lists.osgeo.org
>  http://lists.osgeo.org/mailman/listinfo/mapserver-users
>


-- 
Puneet Kishor http://punkish.eidesis.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/


More information about the mapserver-users mailing list