[gdal-dev] Interpolation when using the WMS format

Peter Hopfgartner peter.hopfgartner at r3-gis.com
Fri Sep 19 03:29:49 PDT 2014


On 09/18/2014 11:03 PM, Jukka Rahkonen wrote:
> Peter Hopfgartner <peter.hopfgartner <at> r3-gis.com> writes:
>
>> Salut Evan,
>>
>> thanks for you recipe. Unfortunately, what I am really interested in is to
> use this from MapServer. Could
>> you give me a pointer in the source where the resampling takes place?
> Hi,
Hi Jukka
> Why don't you test with Mapserver then before starting to code?
You are certainly right that starting with MapServer is a more 
reasonable approach. Anyway, sometimes a look at the code might help to 
better understand the problem. (black box vs. white box)
>   If you use
> Mapserver as WMS GDAL can request correct resolution directly and there
> should be no need at all for resampling.
This is true for WMS layers. Unfortunately, with tiles this is 
different. I guess (and I think to have seen this in the code), that 
GDAL is looking for the best matching resolution for this particular 
tile server, fetches the necessary tiles and then resamples the tiles to 
the final pixmap, which, if not by incredible chance, has a lower 
resolution then the cpomplete set of fetched tiles. My guess is, that in 
this resampling the labels get unreadable to to nearest point 
interpolation, which is really fast but delivers a lower quality then 
e.g. bilinear interpolation.
>   Most Mapservers are also configured
> to use png as one of the outputformats which should lead to better quality
> than the jpeg compressed tiles you have been playing with.
Even here the, I have to follow the rules set by the service provider, 
as specified in http://www.basemap.at/wmts/1.0.0/WMTSCapabilities.xml , 
which limits me to JPEG. I have to take what I get.
> -Jukka Rahkonen-
Regards,

Peter

-- 
Peter Hopfgartner
R3 GIS
web  : www.r3-gis.com



More information about the gdal-dev mailing list