<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="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @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";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=3 color=blue face=Arial><span style='font-size:
12.0pt;font-family:Arial;color:blue'>If I understand correctly, it is because
MapServer is based upon a cell size of center of pixel to center of pixel.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=blue face=Arial><span style='font-size:
12.0pt;font-family:Arial;color:blue'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=3 color=blue face=Arial><span style='font-size:
12.0pt;font-family:Arial;color:blue'>With 1 pixel you have nothing. With 2
pixels you have 1 cell.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=blue face=Arial><span style='font-size:
12.0pt;font-family:Arial;color:blue'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=3 color=blue face=Arial><span style='font-size:
12.0pt;font-family:Arial;color:blue'>Worth Lutz<o:p></o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
mapserver-dev-bounces@lists.osgeo.org
[mailto:mapserver-dev-bounces@lists.osgeo.org] <b><span style='font-weight:
bold'>On Behalf Of </span></b>Martin Kofahl<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, April 10, 2013
2:40 PM<br>
<b><span style='font-weight:bold'>To:</span></b> MapServer Dev Mailing List<br>
<b><span style='font-weight:bold'>Subject:</span></b> [mapserver-dev] WMS
exception for requests width height=1</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Hello,<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>currently, I see wms clients (qgis, arcgis 10) doing getmap requests
with height=1. MapServer (6.2) throws an exception: <o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>msDrawMap(): Image handling error. Unable to initialize image.<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>msCalculateScale(): General error message. Invalid image extent,
minx=nan, miny=nan, maxx=nan, maxy=nan.<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>The reason is in msAdjustExtent(), where the cell size is calculated
using MS_CELLSIZE(miny,maxy,height), defined as ((max - min)/(d-1)).
Formally, I don't see any reasons against 1 pixel requests. What are
the reasons for "d-1"?<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Martin<o:p></o:p></span></font></p>

</div>

</div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=1 width="100%" noshade color="#aca899" align=center>

</span></font></div>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'
color="#000000"><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>No virus found in this message.<br>
Checked by AVG - <a href="http://www.avg.com">www.avg.com</a><br>
Version: 2013.0.3272 / Virus Database: 3162/6236 - Release Date: 04/10/13<o:p></o:p></span></font></p>

</div>

</body>

</html>