<div dir="ltr">Hi Devs,<div><br></div><div>As far as I know certain projections require to modify the scale regarding to the latitude of the given view. For latlong and AFAIK for the web mercator (ie EPSG:3857, EPSG:900913) we might require to use cos(latitude) as the correction factor. </div>
<div><br></div><div>With the current mapserver code, I don't see how this requirement is taken into account. For the units=MS_DD, I can see the following code fragment in the code in msInchesPerUnits (though this is not compiled in by default)</div>
<div><br></div><div><pre style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;margin-top:0px;margin-bottom:0px;color:rgb(51,51,51);line-height:18px"><div class="" id="LC131" style="padding-left:10px">
<span class="" style="color:rgb(153,153,153);font-weight:bold">#ifdef ENABLE_VARIABLE_INCHES_PER_DEGREE</span></div><div class="" id="LC132" style="padding-left:10px">      <span class="" style="font-weight:bold">if</span> <span class="" style>(</span><span class="" style>center_lat</span> <span class="" style="font-weight:bold">!=</span> <span class="" style="color:rgb(0,153,153)">0.0</span><span class="" style>)</span> <span class="" style>{</span></div>
<div class="" id="LC133" style="padding-left:10px">        <span class="" style="color:rgb(68,85,136);font-weight:bold">double</span> <span class="" style>cos_lat</span><span class="" style>;</span></div><div class="" id="LC134" style="padding-left:10px">
        <span class="" style>cos_lat</span> <span class="" style="font-weight:bold">=</span> <span class="" style>cos</span><span class="" style>(</span><span class="" style>MS_PI</span><span class="" style="font-weight:bold">*</span><span class="" style>center_lat</span><span class="" style="font-weight:bold">/</span><span class="" style="color:rgb(0,153,153)">180.0</span><span class="" style>);</span></div>
<div class="" id="LC135" style="padding-left:10px">        <span class="" style>lat_adj</span> <span class="" style="font-weight:bold">=</span> <span class="" style>sqrt</span><span class="" style>(</span><span class="" style="color:rgb(0,153,153)">1</span><span class="" style="font-weight:bold">+</span><span class="" style>cos_lat</span><span class="" style="font-weight:bold">*</span><span class="" style>cos_lat</span><span class="" style>)</span><span class="" style="font-weight:bold">/</span><span class="" style>sqrt</span><span class="" style>(</span><span class="" style="color:rgb(0,153,153)">2.0</span><span class="" style>);</span></div>
<div class="" id="LC136" style="padding-left:10px">      <span class="" style>}</span></div><div class="" id="LC137" style="padding-left:10px"><span class="" style="color:rgb(153,153,153);font-weight:bold">#endif</span></div>
</pre></div><div><br></div><div>Shouldn't the correction be applied for the web mercator (units=MS_METERS) and probably for futher CRS-s as well? </div><div><br></div><div>Should we anyway have <span style="color:rgb(153,153,153);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;font-weight:bold;line-height:18px;white-space:pre">ENABLE_VARIABLE_INCHES_PER_DEGREE </span>defined by default?</div>
<div><br></div><div>Best regards,</div><div><br></div><div>Tamas</div><div><br></div><div><br></div></div>