[OSM-dev] JOSM WMS Plugin degrades input image quality

Frederik Ramm frederik at remote.org
Sun Mar 18 18:48:22 GMT 2007


Hi,

> Just to make this more clear: Is there a way to persuade the WMS plugin
> to hand JOSM the bitmap unaltered so JOSM takes care of the scaling?

The problem is this:

Yahoo doesn't support continuous zoom levels. But WMS servers do, or at 
least they accept queries where you specify a geo bounding box, a 
projection, and a desired image width and height (yes there is 
overspecification here), and they will return exactly that.

With Yahoo, you have to request the finest zoom that will still give you 
the desired bounding box inside the specified width and height window, 
but only in the rarest of cases will you actually receive exactly the 
bounding box you asked for - it will normally be more. So the image has 
to be cropped, and the remaining data has to be rescaled to fit the 
originally requested width and height.

That's because there's no feedback channel by which the WMS server could 
tell the client "look, you asked for this bounding box inside that pixel 
area but I've actually given you a bit more, namely this bounding box, 
so just deal with it".

Possible solutions include

(a) deliberately request a (circa) 50% larger window from Yahoo than we 
actually need, which will still ensue in rescaling, but normally we'll 
only scale down, not up, then.

(b) apply complex arithmetic and, very likely, a multistep approximation 
process to find out which bounding box and pixel area we have to request 
from Yahoo to get something from which we can crop out the image we want 
without any scaling afterwards.

(c) modify the WMS plugin or fork it into a non-WMS plugin that is happy 
with larger-than-requested images being returned, and displays them 
properly.

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00.09' E008°23.33'




More information about the dev mailing list