<div dir="ltr">In that case the, MapServer should calculate with the distance from the size from the center of a single pixel to border, I think. So 0.5. Changes in <a href="https://github.com/mapserver/mapserver/pull/4629">https://github.com/mapserver/mapserver/pull/4629</a><div class="gmail_extra">
<br><br><div class="gmail_quote">2013/4/10 Worth Lutz <span dir="ltr"><<a href="mailto:wal3@mindspring.com" target="_blank">wal3@mindspring.com</a>></span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">










<div lang="EN-US" link="blue" vlink="blue">

<div>

<p class=""><font size="3" color="blue" face="Arial"><span style="font-size:12pt;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.<u></u><u></u></span></font></p>

<p class=""><font size="3" color="blue" face="Arial"><span style="font-size:12pt;font-family:Arial;color:blue"><u></u> <u></u></span></font></p>

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

<p class=""><font size="3" color="blue" face="Arial"><span style="font-size:12pt;font-family:Arial;color:blue"><u></u> <u></u></span></font></p>

<p class=""><font size="3" color="blue" face="Arial"><span style="font-size:12pt;font-family:Arial;color:blue">Worth Lutz<u></u><u></u></span></font></p>

<div>

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

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

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

<p class=""><b><font face="Tahoma"><span style="font-size:10pt;font-family:Tahoma;font-weight:bold">From:</span></font></b><font face="Tahoma"><span style="font-size:10pt;font-family:Tahoma">
<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><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><u></u><u></u></p>

</div><div><div class="h5">

<p class=""><font size="3" face="Times New Roman"><span style="font-size:12pt"><u></u> <u></u></span></font></p>

<div>

<p class=""><font size="3" face="Times New Roman"><span style="font-size:12pt">Hello,<u></u><u></u></span></font></p>

<div>

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

</div>

<div>

<p class=""><font size="3" face="Times New Roman"><span style="font-size:12pt"><u></u> <u></u></span></font></p>

</div>

<div>

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

</div>

<div>

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

</div>

<div>

<p class=""><font size="3" face="Times New Roman"><span style="font-size:12pt"><u></u> <u></u></span></font></p>

</div>

<div>

<p class=""><font size="3" face="Times New Roman"><span style="font-size:12pt">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"?<u></u><u></u></span></font></p>

</div>

<div>

<p class=""><font size="3" face="Times New Roman"><span style="font-size:12pt"><u></u> <u></u></span></font></p>

</div>

<div>

<p class=""><font size="3" face="Times New Roman"><span style="font-size:12pt">Martin<u></u><u></u></span></font></p>

</div>

</div>

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

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

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

<p class="" color="#000000"><font size="3" face="Times New Roman"><span style="font-size:12pt">No virus found in this message.<br>
Checked by AVG - <a href="http://www.avg.com" target="_blank">www.avg.com</a><br>
Version: 2013.0.3272 / Virus Database: 3162/6236 - Release Date: 04/10/13<u></u><u></u></span></font></p>

</div>

</div>


</blockquote></div><br></div></div>