Wow, we answered at same time. So, I'll include my findings here
Even Rouault <mailto:even.roua...@spatialys.com>
February 5, 2015 at 7:30 PM
Jorge,
- 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
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.
The problem is in swig/python/extensions/gdal_wrap.cpp, method
GDALDatasetShadow_WriteRaster, because Buf len = 196608, min buffer size
= 262144.
Is there any method to pass a bigger buffer to JPEG driver? Or just
avoid the 4th band of PNG
- Apply a color to nodata value of generated tiles. Tried passing -a
"200,0,0" to gdal2tiles, but it was ignored.
The doc of -a suggests that it only applies to the input dataset, not the
output
Mmmm... ok. Is there a Python method to specify a color for nodata
pixels when creating an output dataset?
Thanks again, Even!
Even
Jorge Arévalo <mailto:jo...@cartodb.com>
February 5, 2015 at 7:15 PM
- 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
- Apply a color to nodata value of generated tiles. Tried passing -a
"200,0,0" to gdal2tiles, but it was ignored.
Log file, with GDAL_DEBUG=On, where you can see the first problem
(buffer too small):
https://dl.dropboxusercontent.com/u/6599273/errors/gdal/gdal2tiles_error.log
Modified version of gdal2tiles, to generate xyz caches instead of tms
ones:
https://dl.dropboxusercontent.com/u/6599273/errors/gdal/gdal2tiles_modified.py
tif tile for testing (same error with other ones):
https://dl.dropboxusercontent.com/u/6599273/gis_data/katrina.tif
Many thanks!
--
Sent with Postbox <http://www.getpostbox.com>
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev