<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.hoenzb
{mso-style-name:hoenzb;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<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?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Steve<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></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""> mapserver-dev-bounces@lists.osgeo.org [mailto:mapserver-dev-bounces@lists.osgeo.org]
<b>On Behalf Of </b>Tamas Szekeres<br>
<b>Sent:</b> Wednesday, November 27, 2013 10:14 AM<br>
<b>To:</b> mapserver-dev@lists.osgeo.org<br>
<b>Subject:</b> Re: [mapserver-dev] Questions regarding to the extent/scale calculations in MapServer<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Thank you all for the information. <o:p></o:p></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).<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Best regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Tamas<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal">2013/11/27 Daniel Morissette <<a href="mailto:dmorissette@mapgears.com" target="_blank">dmorissette@mapgears.com</a>><o:p></o:p></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 class="hoenzb">Daniel</span></span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><br>
<br>
On 13-11-27 10:37 AM, Daniel Morissette wrote:<o:p></o:p></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:<o:p></o:p></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:<o:p></o:p></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><o:p></o:p></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><o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></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><o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>