<div dir="ltr">I'm keen to create an RFC about this.<div><br></div><div>Tamas</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/2 Lime, Steve D (MNIT) <span dir="ltr"><<a href="mailto:Steve.Lime@state.mn.us" target="_blank">Steve.Lime@state.mn.us</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Tamas: Do you want to create an enhancement ticket for this?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Steve<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:mapserver-dev-bounces@lists.osgeo.org" target="_blank">mapserver-dev-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:mapserver-dev-bounces@lists.osgeo.org" target="_blank">mapserver-dev-bounces@lists.osgeo.org</a>]
<b>On Behalf Of </b>Tamas Szekeres<br>
<b>Sent:</b> Wednesday, November 27, 2013 10:14 AM<br>
<b>To:</b> <a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.osgeo.org</a><br>
<b>Subject:</b> Re: [mapserver-dev] Questions regarding to the extent/scale calculations in MapServer<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Thank you all for the information. <u></u><u></u></p>
<div>
<p class="MsoNormal">I concur with Steve that supporting both of these options controlled by a parameter in the mapfile would be a good compromise (keeping the current behaviour as the default).<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Best regards,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Tamas<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
<div>
<p class="MsoNormal">2013/11/27 Daniel Morissette <<a href="mailto:dmorissette@mapgears.com" target="_blank">dmorissette@mapgears.com</a>><u></u><u></u></p>
<p class="MsoNormal">Oh wait... re-reading my own ticket, we never added the wms_bbox_mode metadata that was initially suggested, what was done in the end is that we implemented a vendor-specific WMS GetMap param called BBOX_PIXEL_IS_POINT=TRUE to switch the
pixel model on the fly (works for WMS only).<span style="color:#888888"><br>
<br>
<span>Daniel</span></span><u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><br>
<br>
On 13-11-27 10:37 AM, Daniel Morissette wrote:<u></u><u></u></p>
<p class="MsoNormal">FYI WorldWind also uses this PixelIsPoint model, and even worse, in<br>
their case they implemented their WMS client code to incorrectly send<br>
center of pixel coordinates in the WMS BBOX (the WMS spec says that BBOX<br>
coordinates are the outside of the corner pixels == PixelIsArea).<br>
<br>
So in order to allow compatibility with WorldWind when deploying<br>
MapServer servers for WorldWind use, we added a wms_bbox_mode param that<br>
does more or less what Steve suggests here, but for WMS only (and it<br>
indeed breaks WMS compliance).<br>
<br>
More info: <a href="https://github.com/mapserver/mapserver/issues/4652" target="_blank">
https://github.com/mapserver/mapserver/issues/4652</a><br>
<br>
Daniel<br>
<br>
<br>
On 13-11-27 10:27 AM, Stephen Woodbridge wrote:<u></u><u></u></p>
<p class="MsoNormal">Steve L,<br>
<br>
If this would be "easy" to change internally would it make sense to<br>
allow this to be configured in the mapfile. By default the behavior<br>
would remain the same, but we would have an option in the map object<br>
like:<br>
<br>
PIXELMODEL POINT|AREA<br>
<br>
then it would be easy for people to use what they need?<br>
<br>
Food for thought!<br>
<br>
-Steve W<br>
<br>
On 11/27/2013 10:15 AM, Lime, Steve D (MNIT) wrote:<u></u><u></u></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">The model was based on how ERDAS represented pixels back when MapServer<br>
was first written. I was a satellite image processing guy at the time<br>
and that was the initial focus of the software. Early code used the<br>
ERDAS C toolkit which reinforced the model. Personally I think the<br>
center of a pixel model makes more sense.<br>
<br>
Changing would probably be **very** disruptive. Not so much within<br>
MapServer code since the areas of change are pretty isolated in a few<br>
macros and transformations in the OWS code. The change would affect<br>
every mapfile that sets or uses scale denominators. Plus, clients would<br>
need to be updated and need to be made version aware.<br>
<br>
Steve<br>
<br>
*From:*<a href="mailto:mapserver-dev-bounces@lists.osgeo.org" target="_blank">mapserver-dev-bounces@lists.osgeo.org</a><br>
[mailto:<a href="mailto:mapserver-dev-bounces@lists.osgeo.org" target="_blank">mapserver-dev-bounces@lists.osgeo.org</a>] *On Behalf Of *Tamas<br>
Szekeres<br>
*Sent:* Wednesday, November 27, 2013 8:54 AM<br>
*To:* <a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.osgeo.org</a><br>
*Subject:* [mapserver-dev] Questions regarding to the extent/scale<br>
calculations in MapServer<br>
<br>
Hi All,<br>
<br>
We've already noticed MapServer use a "center of pixel" representation<br>
when doing the extent/scale calculations in the code, which may cause<br>
quite some confusion for the users (mostly from the mapscript side)<br>
regarding to the behaviour.<br>
<br>
The most typical issue I've encountered is the complain about "why<br>
mapserver modifies my accurate extent specified in setExtent and why<br>
MapServer calculates a different scale I can calculate?"<br>
<br>
The reason of why is in fact that we consider the area coverage of the<br>
image is larger than the area coverage of the map extent (half of the<br>
pixel size in each directions). But the users (and mostly everyone in<br>
the world except MapServer) considers that the area coverage of the<br>
image is the same as the area coverage of the map extent.<br>
<br>
Can someone explain why we do things this way and do we have the chance<br>
to get rid of it?<br>
<br>
We could also eliminate the unnecessary transformations done in the<br>
WMS/WCS interface where the extent of the BBOX is considered to be in -<br>
let's say - edge of pixel representation and not in center of pixel<br>
representation.<br>
<br>
Best regards,<br>
<br>
Tamas<br>
<br>
<br>
<br>
_______________________________________________<br>
mapserver-dev mailing list<br>
<a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><u></u><u></u></p>
<p class="MsoNormal"><br>
_______________________________________________<br>
mapserver-dev mailing list<br>
<a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><u></u><u></u></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
<p class="MsoNormal"><br>
<br>
-- <br>
Daniel Morissette<br>
<a href="http://www.mapgears.com/" target="_blank">http://www.mapgears.com/</a><br>
Provider of Professional MapServer Support since 2000<br>
<br>
_______________________________________________<br>
mapserver-dev mailing list<br>
<a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><u></u><u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>
</blockquote></div><br></div>