<div>Hi all,</div><div><br></div><div>Having an issue with some images I&#39;m caching and re-aligning using mapproxy 1.0.</div><div><br></div>
<div>When the query goes out from mapproxy, it looks something like the following.  Everything looks fine on the source/cache side as this is what I expect to see (the image in question is a heightmap)</div><div><a href="http://wms.jpl.nasa.gov/wms.cgi?request=GetMap&amp;layers=us_ned&amp;srs=EPSG:4326&amp;width=300&amp;height=300&amp;format=image/png&amp;styles=feet_short_int&amp;bbox=-125.000000,7.333333,-82.333333,50.000000" target="_blank">http://wms.jpl.nasa.gov/wms.cgi?request=GetMap&amp;layers=us_ned&amp;srs=EPSG:4326&amp;width=300&amp;height=300&amp;format=image/png&amp;styles=feet_short_int&amp;bbox=-125.000000,7.333333,-82.333333,50.000000</a></div>

<div><a href="http://img600.imageshack.us/img600/4759/wmsp.png" target="_blank">http://img600.imageshack.us/img600/4759/wmsp.png</a>   (I uploaded this image from my cache)</div><div>2011-04-13 14:04:25,398 - INFO - 6600:mapproxy.client.http.http:_log - <a href="http://wms.jpl.nasa.gov">wms.jpl.nasa.gov</a> - - [13/Apr/2011:14:04:25 ] &quot;GET /wms.cgi?request=GetMap&amp;layers=us_ned&amp;srs=EPSG:4326&amp;width=300&amp;height=300&amp;format=image/png&amp;styles=feet_short_int&amp;bbox=-125.000000,7.333333,-82.333333,50.000000 HTTP/1.1&quot; 200 58469 &quot;-&quot; &quot;&quot;<br>
<br></div><div>However, whenever I query mapproxy with the bbox aligned as I need it, the image returned is almost entirely white (destroying the heightmap values I need)</div>
<div><br></div><div><a href="http://img864.imageshack.us/img864/8105/000zl.png" target="_blank"></a><a href="http://127.0.0.1:8080/service?SERVICE=WMS&amp;REQUEST=GetMap&amp;VERSION=1.3.0&amp;WIDTH=256&amp;HEIGHT=256&amp;BBOX=20,-125,55,-60&amp;CRS=EPSG:4326&amp;FORMAT=image/png&amp;LAYERS=us_ned&amp;STYLES=&amp;TRANSPARENT=FALSE" target="_blank">http://127.0.0.1:8080/service?SERVICE=WMS&amp;REQUEST=GetMap&amp;VERSION=1.3.0&amp;WIDTH=256&amp;HEIGHT=256&amp;BBOX=20,-125,55,-60&amp;CRS=EPSG:4326&amp;FORMAT=image/png&amp;LAYERS=us_ned&amp;STYLES=&amp;TRANSPARENT=FALSE</a><br>

<div><a href="http://img709.imageshack.us/img709/9559/service.png" target="_blank">http://img709.imageshack.us/img709/9559/service.png</a> (This is the image returned by the above query)</div><div>127.0.0.1 - - [13/Apr/2011:15:21:51 -0500] &quot;GET /service?SERVICE=WMS&amp;REQUEST=GetMap&amp;VERSION=1.3.0&amp;WIDTH=256&amp;HEIGHT=256&amp;BBOX=20,-125,55,-60&amp;CRS=EPSG:4326&amp;FORMAT=image/png&amp;LAYERS=us_ned&amp;STYLES=&amp;TRANSPARENT=FALSE HTTP/1.1&quot; 200 8218 &quot;-&quot; &quot;Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16&quot;</div>
<div><br></div><div>It looks like mapproxy is attempting to recolor the image in some way - is there any way to disable that behavior?</div>
<div><br></div><div><a href="http://img709.imageshack.us/img709/9559/service.png" target="_blank"></a><div>Here are the relevant configuration snippets:</div><div><br></div><div><div>globals:</div><div>  cache:</div><div>
    meta_size: [1, 1]</div>
<div>    meta_buffer: 0</div></div><div><div>grids:</div><div>  nasa_jpl:</div><div>    tile_size: [300, 300]</div><div>    srs: &#39;EPSG:4326&#39;</div><div>    bbox: [-125, -35.33333333, -39.666666666, 50]</div><div>    bbox_srs: &#39;EPSG:4326&#39;</div>

</div><div>layers:</div><div><div>  us_ned:</div><div>    title: NASA JPL - US NED 30m</div><div>    sources: [nasa_jpl_ned_cache]</div></div><div>caches:</div><div><div>  nasa_jpl_ned_cache:</div><div>    grids: [nasa_jpl]</div>

<div>    sources: [nasa_jpl_ned_src]</div></div><div>sources:</div><div><div>  nasa_jpl_ned_src:</div><div>    type: tile</div><div>    url: <a href="http://wms.jpl.nasa.gov/wms.cgi?request=GetMap&amp;layers=us_ned&amp;srs=EPSG:4326&amp;width=300&amp;height=300&amp;format=image/png&amp;styles=feet_short_int&amp;%(bbox)s" target="_blank">http://wms.jpl.nasa.gov/wms.cgi?request=GetMap&amp;layers=us_ned&amp;srs=EPSG:4326&amp;width=300&amp;height=300&amp;format=image/png&amp;styles=feet_short_int&amp;%(bbox)s</a></div>

<div>    grid: nasa_jpl</div><div>    origin: nw</div><div>    transparent: false</div></div><div><br></div><div>Note: the bbox query param is an extension I&#39;ve added to mapproxy as discussed in this thread <a href="http://lists.osgeo.org/pipermail/mapproxy/2011-March/000465.html" target="_blank">http://lists.osgeo.org/pipermail/mapproxy/2011-March/000465.html</a>  (<a href="http://onearth.jpl.nasa.gov/tiled.html" target="_blank">http://onearth.jpl.nasa.gov/tiled.html</a>)</div>

<div>I&#39;ll be submitting it for incorporation once it&#39;s complete, I&#39;ve just left the code out for now as I don&#39;t believe it pertains to the issue.  If seeing it would help just ask and I can post a patch of what I have so far.</div>

<br>-- <br>Tom Batkiewicz<br>Software Engineer, Priority 5<br>
<a href="http://www.priority5.com/" target="_blank">http://www.priority5.com/</a><br><br>
</div></div>