Re: [mapserver-users] Resampling and image quality?
I guess I don't get the process that the nice image is going through. Are you having to pre-reproject it to Mercator before slicing it up for the exact Google maps zoom levels? Or do you just provide it in 4326 and google maps takes care of reprojecting it? It's in latlong and letting Google Maps do whatever it does; or Mapserver reproject it. Reprojecting it ahead of time made no difference. Are the source PNGs paletted or RGB 24bit? The original PNGs are 8-bit paletted. Presented to me is a RGB TIFF, because I knew that paletted wasn't going to cut it. Selecting PROCESSING RESAMPLE=BILINEAR and giving it 24bit RGB input files should give something fairly similar I'd think. Nope. I've already tried all 4 resampling algorithms, 24 bit TIFFs, and overviews with -r average, and the oversample_ratio directive. No significant effect. That current combination is up now if you want to see. Hmm? -- 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@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Resampling and image quality?
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 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Resampling and image quality?
On 3/27/08, Gregor Mosheh [EMAIL PROTECTED] 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@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/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Resampling and image quality?
I'll be on the plane all day tomorrow, on my way to DC for the PostgreSQL East conference. If I don't reply, it's not personal. :) P Kishor wrote: yikes! The ms2 version is fugly. M hm. This is the first time we've ever compared the PNG with the Mapserver output side by side, especially in a situation where the raster has text in it, so I'm also surprised! 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? The one I'm given for use in Mapserver, is the same PNG except left whole and with a world file added. The plain PNG version is sliced for use in a GTileoverlay, but is otherwise the same. Or did I misunderstand the question? -- 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@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Resampling and image quality?
Frank Warmerdam wrote: I zoomed in on both, and I don't see the effect you are talking about. Perhaps you need something a little less error prone, like screen snaps that demonstrate what you are talking about! Sure thing: http://ms2.geowake.com/ms_fullview.png http://ms2.geowake.com/ms_3_notches_in.png http://ms2.geowake.com/ms_5_notches_in.png http://ms2.geowake.com/png_fullview.png http://ms2.geowake.com/png_3_notches_in.png http://ms2.geowake.com/png_5_notches_in.png Note how the png ones lack the jagged crunchy quality, how even the smaller text is legible and smooth at the tighter zoomlevels. The Mapserver one, though, is illegible and looks as if it's been downsized or something. -- 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@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users