Hello,<br>Nobody has replied to the following message. I would be grateful if somebody could take some minutes to express his feeling about the behavior I described that seems strange to me.<br>Thanks.<br><br><div class="gmail_quote">
---------- Message transféré ----------<br>De : <b class="gmail_sendername">fred p</b> <span dir="ltr">&lt;<a href="mailto:mapoubelle22@gmail.com">mapoubelle22@gmail.com</a>&gt;</span><br>Date : 12 octobre 2011 13:47<br>Objet : mapresample algorithm<br>
À : <a href="mailto:mapserver-dev@lists.osgeo.org">mapserver-dev@lists.osgeo.org</a><br><br><br>Hello,<br><br>I want to serve a source image via a WMS through mapserver but I sometimes get a very low resolution due to the algorithm applied in the msResampleGDALToMap method in mapresample.c. This occurs when I request a much larger area  and a much lower resolution than the ones of the source image.<br>

<br>For example, here is an extract of the gdalinfo :<br><br>Size is 8192, 6144<br>Coordinate System is:<br>PROJCS[&quot;unnamed&quot;,<br>    GEOGCS[&quot;unnamed ellipse&quot;,<br>        DATUM[&quot;unknown&quot;,<br>
            SPHEROID[&quot;unnamed&quot;,6378160,298.2539162964669]],<br>
        PRIMEM[&quot;Greenwich&quot;,0],<br>        UNIT[&quot;degree&quot;,0.0174532925199433]],<br>    PROJECTION[&quot;Polar_Stereographic&quot;],<br>    PARAMETER[&quot;latitude_of_origin&quot;,60],<br>    PARAMETER[&quot;central_meridian&quot;,0],<br>

    PARAMETER[&quot;scale_factor&quot;,1],<br>    PARAMETER[&quot;false_easting&quot;,0],<br>    PARAMETER[&quot;false_northing&quot;,0],<br>    UNIT[&quot;metre&quot;,1,<br>        AUTHORITY[&quot;EPSG&quot;,&quot;9001&quot;]]]<br>

Origin = (-4937982.331945824436843,-1228156.832371974131092)<br>Pixel Size = (1093.000000000000000,-1093.000000000000000)<br>Corner Coordinates:<br>Upper Left  (-4937982.332,-1228156.832) ( 76d 1&#39;58.80&quot;W, 43d45&#39;32.40&quot;N)<br>

Lower Left  (-4937982.332,-7943548.832) ( 31d51&#39;59.40&quot;W, 13d34&#39;43.86&quot;N)<br>Upper Right <a href="tel:%28%204015873.668" value="+14015873668" target="_blank">( 4015873.668</a>,-1228156.832) ( 72d59&#39;42.10&quot;E, 51d11&#39;57.65&quot;N)<br>
Lower Right <a href="tel:%28%204015873.668" value="+14015873668" target="_blank">( 4015873.668</a>,-7943548.832) ( 26d49&#39;8.23&quot;E, 16d20&#39;22.12&quot;N)<br>
<br>Here is an extract of the WMS request :<br><br>&amp;width=885&amp;height=443&amp;bbox=-177,-88.6,177,88.6&amp;<br><br>The algorithm transforms the requested bbox in the SRS of the origin image and calculates the size in the source image (sOrigSrcExtent) of this bbox before evaluating sDummyMap.cellsize from sOrigSrcExtent. As a result I get a very low nLoadImgXSize an nLoadImgYSize (respectivly 8 and 6 !). Wouldn&#39;t it be possible to improve this algorithm by calculating sDummyMap.cellsize from the extent of the origin image instead of from the extent of the transformed requested bbox ?<br>

<br>For now I have identified 2 alternatives (maybe there are others ?) that are not really convenient :<br>1 - calculate while handling any request an adequate oversample_ratio (doesn&#39;t simplify the code of my mapscript ;))<br>

2 - use the processing option &quot;load_whole_image&quot; but the response time is affected.<br><br>Thanks in advance for your response / help.<br><br>
        <img src="http://www.qtl.co.il/img/copy.png" title="Copy Selction"><a href="http://int.ask.com/web?siteid=10000861&amp;webqsrc=999&amp;l=dis&amp;q=mapresample" title="Search With Ask" target="_blank"><img src="http://www.ask.com/favicon.ico"></a><img src="http://translate.google.com/favicon.ico" title="Translate With Google">
        
</div><br><style>
qtl {
        position: absolute;
        border: 1px solid #cccccc;
        -moz-border-radius: 5px;
        opacity: 0.2;
        line-height: 100%;
        z-index: 999;
        direction: ltr;
}

qtl:hover,qtl.open {
        opacity: 1;
}

qtl,qtlbar {
        height: 22px;
}

qtlbar {
        display: block;
        width: 100%;
        background-color: #cccccc;
        cursor: move;
}

qtlbar img {
        border: 0;
        padding: 3px;
        height: 16px;
        width: 16px;
        cursor: pointer;
}

qtlbar img:hover {
        background-color: #aaaaff;
}

qtl>iframe {
        border: 0;
        height: 0;
        width: 0;
}

qtl.open {
        height: auto;        
}

qtl.open>iframe {
        height: 200px;
        width: 300px;
}
</style>
        <img src="http://www.qtl.co.il/img/copy.png" title="Copy Selction"><a href="http://int.ask.com/web?siteid=10000861&amp;webqsrc=999&amp;l=dis&amp;q=feedback" title="Search With Ask" target="_blank"><img src="http://www.ask.com/favicon.ico"></a><img src="http://translate.google.com/favicon.ico" title="Translate With Google">