[mapserver-users] Non-square pixels when re-projecting on the fly

Peter Schmitt pschmitt at gmail.com
Fri Nov 18 09:28:06 PST 2016


On Fri, Nov 18, 2016 at 12:44 AM, Rahkonen Jukka (MML) <
jukka.rahkonen at maanmittauslaitos.fi> wrote:

> I do not quite believe that your output pixels are non-square. I rather
> think that what you see are views of the native 4326 pixels reprojected
> into 3857.  In Scotland (7536002 N in epsg:3857) projecting data from 4326
> to 3857 is making quite a big stretch in Nort-South direction. With your
> test GetMap request the pixel size in output is about 2.33 millimeters
> which must mean heavy oversampling.
>
>
>
Thanks for the reply!  You are correct:  the images I displayed are zoomed
pretty far in, resulting in heavy oversampling.  Here's a sample showing
one pixel (blue highlight) on the heavily oversampled image:
http://i.imgur.com/scO8iIm.png  It is the oversampling I am trying to
understand.

Here is a heavily oversampled GetMap with data which went through gdalwarp
to reproject the data from 4326 to 3857... then I use Mapserver to display
the results setting the input & output PROJECTION blocks to 3857:
http://i.imgur.com/MrfDb1E.png I expected Mapserver reproject on the fly to
look more like this.  Instead, oversampled pixels are stretched, like this:
http://i.imgur.com/bw4pNPX.png

I played around with various `PROCESSING "RESAMPLE=resample_method"` in my
layer, but I get the same stretched output on heavily oversampled output
using Mapserver to reproject on the fly from 4326 to 3857.  When zoomed out
to near-native resolution of my monitor, the output looks great. I only
notice the stretching when oversampled. What is Mapserver using to
reproject on the fly?

Thanks again!
Pete
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20161118/ffce49da/attachment.html>


More information about the mapserver-users mailing list