<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Hello,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I'm currently running a TMS tile server generating geotiff tiles from DEM data which I'm consuming with the GDAL TMS driver using an XML file along the following lines:</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"></p>
<div><GDAL_WMS></div>
<div> <Service name="TMS"></div>
<div> <ServerUrl>http://localhost:8080/terrain/${z}/${x}/${y}.tif</ServerUrl></div>
<div> </Service></div>
<div> <DataWindow></div>
<div> <UpperLeftX>-20037508.34</UpperLeftX></div>
<div> <UpperLeftY>20037508.34</UpperLeftY></div>
<div> <LowerRightX>20037508.34</LowerRightX></div>
<div> <LowerRightY>-20037508.34</LowerRightY></div>
<div> <TileLevel>20</TileLevel></div>
<div> <TileCountX>1</TileCountX></div>
<div> <TileCountY>1</TileCountY></div>
<div> <YOrigin>top</YOrigin></div>
<div> </DataWindow></div>
<div> <Projection>EPSG:3857</Projection></div>
<div> <BlockSizeX>256</BlockSizeX></div>
<div> <BlockSizeY>256</BlockSizeY></div>
<div> <DataType>Float32</DataType></div>
<div> <BandsCount>1</BandsCount></div>
<div> <MaxConnections>50</MaxConnections></div>
<div> <ZeroBlockHttpCodes>204,404,500</ZeroBlockHttpCodes></div>
<div></GDAL_WMS></div>
<div><br>
</div>
This all works perfectly except for the fact that the responses interpreted as <span><ZeroBlockHttpCodes> are filled with a default value of 0. This obviously isn't great for elevation data :) Ideally I'd like to be able to specify a fill or NODATA value somewhere
in the XML, something like:</span>
<p></p>
<p style="margin-top:0;margin-bottom:0"><span><br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><span><span><GDAL_WMS></span><br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><span><span>...</span></span></p>
<p style="margin-top:0;margin-bottom:0"><span><span> <NoData>-9999</NoData></span></span></p>
<p style="margin-top:0;margin-bottom:0"><span><span>or</span></span></p>
<p style="margin-top:0;margin-bottom:0"><span><span> <FillValues>-9999</FillValues></span></span></p>
<p style="margin-top:0;margin-bottom:0"><span><span>...</span></span></p>
<p style="margin-top:0;margin-bottom:0"><span><span><span></GDAL_WMS></span><br>
</span></span></p>
<p style="margin-top:0;margin-bottom:0"><span><br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><span>The contents of a <NoData> tag might be a comma separated list for multiband rasters.</span></p>
<p style="margin-top:0;margin-bottom:0"><span><br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><span>Would an enhancement request to support this be acceptable? Otherwise can anyone suggest any workarounds for the issue? </span></p>
<p style="margin-top:0;margin-bottom:0"><span><br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><span>My current thoughts are that I could generate zero filled tiffs and return those instead of 404 responses, and wrap the TMS XML with a VRT that assigns an appropriate NODATA value. This is far from ideal however,
as there are a lot of potential 404s and generating data for this is wasteful in terms of processing and bandwidth.</span></p>
<p style="margin-top:0;margin-bottom:0"><span><br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><span>Best regards,</span></p>
<p style="margin-top:0;margin-bottom:0"><span><br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><span>Homme</span></p>
<p style="margin-top:0;margin-bottom:0"><span><br>
</span></p>
</div>
</body>
</html>