[mapserver-users] Resampling and image quality?
Gregor Mosheh
gregor at hostgis.com
Thu Mar 27 20:16:01 PDT 2008
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.
So, what to do? I have tried and eliminated several possibilities, and
am stumped.
- 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
More information about the MapServer-users
mailing list