<html><head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
</head><body bgcolor="#FFFFFF" text="#000000">Wow, we answered at same
time. So, I'll include my findings here<br>
<br>
<blockquote style="border: 0px none;"
cite="mid:201502051930.00043.even.rouault@spatialys.com" type="cite">
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="even.rouault@spatialys.com" photoname="Even Rouault"
src="cid:part1.03050404.07040806@cartodb.com"
name="compose-unknown-contact.jpg" height="25px" width="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:even.rouault@spatialys.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Even Rouault</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">February 5, 2015
at 7:30 PM</span></font></div></div></div>
<div style="color: rgb(136, 136, 136); margin-left: 24px;
margin-right: 24px;" __pbrmquotes="true" class="__pbConvBody"><pre wrap="">Jorge,
</pre><blockquote type="cite"><pre wrap="">- Generate JPEG tiles instead of PNG. Tried just replacing the driver's
name (PNG) with JPEG. Didn't work. Base tiles are generated, but
overview tiles are not. Getting this error instead: ERROR 1: Buffer too
small
</pre></blockquote><pre wrap=""><!---->
This messages comes from the WriteRaster() Python bindings, when it is passed
a buffer that isn't large enough regarding the advertized buffer dimensions.
Perhaps due to the fact that JPEG only supports 3 bands and PNG 4, although
this is just a guess without deeper inspection.</pre></div>
</blockquote>
<br>
<br>
<span>The problem is in swig/python/extensions/gdal_wrap.cpp, method
GDALDatasetShadow_WriteRaster, because Buf len = 196608, min buffer size
= 262144. <br>
<br>
Is there any method to pass a bigger buffer to JPEG driver? Or just
avoid the 4th band of PNG<br>
</span><br>
<blockquote style="border: 0px none;"
cite="mid:201502051930.00043.even.rouault@spatialys.com" type="cite">
<div style="color: rgb(136, 136, 136); margin-left: 24px;
margin-right: 24px;" __pbrmquotes="true" class="__pbConvBody"><blockquote
type="cite"><pre wrap="">- Apply a color to nodata value of generated tiles. Tried passing -a
"200,0,0" to gdal2tiles, but it was ignored.
</pre></blockquote><pre wrap=""><!---->
The doc of -a suggests that it only applies to the input dataset, not the
output
</pre></div>
</blockquote>
Mmmm... ok. Is there a Python method to specify a color for nodata
pixels when creating an output dataset? <br>
<br>
<br>
Thanks again, Even!<br>
<blockquote style="border: 0px none;"
cite="mid:201502051930.00043.even.rouault@spatialys.com" type="cite">
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody">
<pre wrap="">
Even
</pre>
</div>
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="jorge@cartodb.com" photoname="Jorge Arévalo"
src="cid:part2.08040200.05030403@cartodb.com" name="postbox-contact.jpg"
height="25px" width="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:jorge@cartodb.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Jorge Arévalo</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">February 5, 2015
at 7:15 PM</span></font></div></div></div>
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody">
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
- Generate JPEG tiles instead of PNG. Tried just replacing the driver's
name (PNG) with JPEG. Didn't work. Base tiles are generated, but
overview tiles are not. Getting this error instead: ERROR 1: Buffer too
small<br>
- Apply a color to nodata value of generated tiles. Tried passing -a
"200,0,0" to gdal2tiles, but it was ignored.<br>
<br>
<br>
Log file, with GDAL_DEBUG=On, where you can see the first problem
(buffer too small):
<a moz-do-not-send="true"
href="https://dl.dropboxusercontent.com/u/6599273/errors/gdal/gdal2tiles_error.log"
class="moz-txt-link-freetext">https://dl.dropboxusercontent.com/u/6599273/errors/gdal/gdal2tiles_error.log</a><br>
Modified version of gdal2tiles, to generate xyz caches instead of tms
ones:
<a moz-do-not-send="true"
href="https://dl.dropboxusercontent.com/u/6599273/errors/gdal/gdal2tiles_modified.py"
class="moz-txt-link-freetext">https://dl.dropboxusercontent.com/u/6599273/errors/gdal/gdal2tiles_modified.py</a><br>
tif tile for testing (same error with other ones):
<a moz-do-not-send="true"
href="https://dl.dropboxusercontent.com/u/6599273/gis_data/katrina.tif"
class="moz-txt-link-freetext">https://dl.dropboxusercontent.com/u/6599273/gis_data/katrina.tif</a><br>
<br>
Many thanks!<br>
<br>
</div>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<div>Sent with <a href="http://www.getpostbox.com"><span style="color:
rgb(51, 102, 153);">Postbox</span></a></div></div>
</body></html>