[mapserver-users] MapServer's image quality stinks serving uptheseNOAA NRCs [SEC=UNCLASSIFIED]

Roppola, Antti - BRS Antti.Roppola at brs.gov.au
Mon Apr 21 02:21:44 EDT 2008


That's why approaches such as antialiasing as so useful in resizing
imagery.
However while that'll give you an asthetically pleasing representation
of a
resampled raster (like a thumbnail), text labels won't be readable. Last
time
I looked, Mapserver used a fast (but less asthetic) nearest neighbor
algorithm
which would give exactly the result Gregor describes.

Sites like Google Maps know this and pre-generate/cache tiles at
appropriate
resolutions (from vectro data) so that text is rendered at an
appropriate resolution.
Scans of hardcopy maps will always be best really bad at handling text
(there's no easy
way to set appropriate scale thresholds for text pixels). We did some
bathymetry soundings
and they weren't too bad only because the text density wasn't high
enough to drown
out the non-text content.

Something like a majority() image filter could be used to create an
overview that
sample out text (black) that is not going to be legible anyway.

I'm not sure how much effort is needed; I'd like to think this is a
legacy issue
from the paper map era. Navigation charts are a bit unusual in that the
chart is
usually a legal document and experssing the legal concepts digitally has
taken time.

Cheers,

Antti

P.S. gdaltanslate will do pixel-by-pixel format conversion. Gdalwarp is
a raster
resampler and therefore by definition a potentially (very!) data
destructive tool.
Gregor may even be looking at two signiciant resampling events.

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Rahkonen
Jukka
Sent: Monday, 21 April 2008 3:30 PM
To: Gregor Mosheh; mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] MapServer's image quality stinks serving
uptheseNOAA NRCs

Gregor Mosheh wrote:

> URL   http://ms2.geowake.com/
These were KAP files downloaded from NOAA's Raster Nautical Charts
(NRCs), converted to TIFF with gdalwarp.

> The image quality there stiiiinks! A second map (no longer available)
made of the raw images sliced into PNGs and not run via MapServer, looks
very nice. You can make out text in 1 zoom, the high-level maps are less
grainy, the quality once you zoom in is better...

> Any thoughts on why it'd be so ugly? The images almost look as if
they've been downsized, don't they?

Aren't they inevidently downsized if you are looking at the whole North
American coastline with just something like 800 by 600 pixels on screen?
I can see very similar ugly view when I fit on the screen a large
OpenStreetMap map (12000 by 12000 pixels)  rendered with a lot of
details. The map begins to look nice once I zoom in such much that the
labels come readable. I have been thinking that it is because the street
names and other details every now and then makes some downsampled image
pixel to appear black. For the algorithm it might be OK but for the one
who is looking at the map it makes just noise. In your case there are
whole lot of contour lines and depth values causing the noise. I guess
that if you mosaic lots of image tiles together and open it with
Photoshop or whatever else viewer your experience would not be much
better.
I don't believe you can improve the far-away zoom quality much with
Mapserver. You may try to filter out digitally some depth values
squeesed nos to one pixel only or try some other tricks, but I think
that best you could do is to find out another map that is originally
made to be be used at nationwide scale.

-Jukka Rahkonen-
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

------IMPORTANT - This message has been issued by The Department of Agriculture, Fisheries and Forestry (DAFF). The information transmitted is for the use of the intended recipient only and may contain confidential and/or legally privileged material. It is your responsibility to check any attachments for viruses and defects before opening or sending them on. 

Any reproduction, publication, communication, re-transmission, disclosure, dissemination or other use of the information contained in this e-mail by persons or entities other than the intended recipient is prohibited. The taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error please notify the sender and delete all copies of this transmission together with any attachments. If you have received this e-mail as part of a valid mailing list and no longer want to receive a message such as this one advise the sender by return e-mail accordingly. Only e-mail correspondence which includes this footer, has been authorised by DAFF 
------


More information about the mapserver-users mailing list