<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">This would be perfectly compatible with
the difference on 1 pixel.<br>
<br>
Thanks,<br>
<br>
Peter<br>
<br>
On 07/25/2014 12:32 AM, Lime, Steve D (MNIT) wrote:<br>
</div>
<blockquote
cite="mid:C549F0496453D842B4DD71AC8188DDC507E9F1FF@055-CH1MPN1-041.055d.mgd.msft.net"
type="cite">
<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;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 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";
color:black;}
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;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@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]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">There’s
a difference between the extent models used by MapServer and
OGC. The WMS code adjusts for that difference so the input
extent will definitely see adjustment to account for that.
OGC uses the UL corner of the UL pixel and the LR corner of
the LR pixel. MapServer uses pixel centers consistently. Do
your scale computations account for this difference?<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>
<div>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>
[<a class="moz-txt-link-freetext" href="mailto:mapserver-users-bounces@lists.osgeo.org">mailto:mapserver-users-bounces@lists.osgeo.org</a>]
<b>On Behalf Of </b>Peter Hopfgartner<br>
<b>Sent:</b> Thursday, July 24, 2014 7:20 AM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<b>Subject:</b> Re: [mapserver-users] WMS Client changes
slightly BBOX<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi Worth,<br>
<br>
thanks for your quick reply. Anyway, the ratio of the extent
and of the image seem to match al least up to 10 digits.
Playing with the numbers, the error is in the same order of
magnitude as if I change image size by one pixel. I would
guess, that there is a "off by 1" error somewhere in the
MapServer code.<br>
<br>
Regards,<br>
<br>
Peter<br>
<br>
On 07/24/2014 01:30 PM, Worth Lutz wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">Peter,<br>
<br>
I have found that if the map size (width and height in
pixels) aspect ratio does not exactly match the map
extents (map units) aspect ratio the map extents are
adjusted.<br>
<br>
I'm working with MapScript and to get exact scale pdf map
I have to set map size first and then extent and then
scale to get good results.<br>
<br>
I hope this helps.<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
<br>
<b>Worth Lutz</b><br>
------------------<o:p></o:p></p>
</div>
<p class="MsoNormal">On 07/24/2014 06:49 AM, Peter
Hopfgartner wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">I'm generating dynamically Map Object,
with with a certain extent, in the concrete example
<br>
629396.05065523,4984079.9894638,655192.92565523,5019084.3644638
<br>
<br>
In generated Map object uses the WMS client functionality
to call WMS services. Anyway, the BBOX get's slightly
changed, so that the original scale of 1:100000 gets
changed to approx 1:100103, since it calls the WMS
services with
<br>
629382.807906257,4984062.02007212,655206.168404203,5019102.33385548
<br>
as can be taken from the web server log files: <br>
<br>
mmm.mmm.mmm.mmm - - [24/Jul/2014:12:25:58 +0200] "GET
/author/services/ows.php?PROJECT=ancitel&MAP=catasto_reti&LANG=xw&OGSTAT=ot3cp0i7qmph4guuof75702m70&RESOLUTION=96&LAYERS=dtm,uso_lombardia,strade_lombardia,g_limiti_amministrativi,g_label,g_0707,g_0704&REQUEST=GetMap&SERVICE=WMS&FORMAT=image/png%3B+mode%3D8bit&STYLES=,,,,,,&HEIGHT=1323&VERSION=1.1.1&SRS=EPSG:32632&WIDTH=975&BBOX=629382.807906257,4984062.02007212,655206.168404203,5019102.33385548&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage
HTTP/1.1" 200 678803 "-" "MapServer/6.4.1 libcurl/7.19.7"
<br>
<br>
This change in scale is beyound te axpected tolerance in
this particular use case, where technical data must be
plotted in a PDF file.
<br>
<br>
Any help is appreciated. Obvioulsly, I can fetch the WMS
services in my code and overlay them "by hand". Anyway,
for a couple of reasons this was the preferred approach.
<br>
<br>
Regards, <br>
<br>
Peter <br>
<br>
<br>
<br>
<br>
<o:p></o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>mapserver-users mailing list<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><br>
<br>
<br>
<br>
<o:p></o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>mapserver-users mailing list<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><o:p></o:p></pre>
</blockquote>
<o:p> </o:p>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Peter Hopfgartner
R3 GIS Srl - GmbH
web : <a class="moz-txt-link-freetext" href="http://www.r3-gis.com">http://www.r3-gis.com</a>
</pre>
</body>
</html>