ARiisgaard / Thesis

0 stars 0 forks source link

gdal2tiles creates tiles with error: Buffer too small #22

Open ARiisgaard opened 4 years ago

ARiisgaard commented 4 years ago

When running my modified version (changed fra png to tiff) of gdal2tiles I get the error: ERROR 1: Buffer too small

The tiles does get produced, but the geoinfo gets lost in the process. The person, who originally was changing gdal2tiles to a higher bitsize, had the same issue. He mentions that the issue was due to something being wrong in the java part:

..Thanks, this led me to a conclusion something was wrong in the Java part. I've investigated related objects and found a different method for reading values for cases with multiple bands in the image.

Now everything works as expected.

crstn commented 4 years ago

Have you tried re-opening that thread to figure out what the guy did to fix the problem?

ARiisgaard commented 4 years ago

image

Turns out the buffer being to small seems to be the fact that my raster files wasn't perfectly dividable with the tile size. As illustrated in the figure above it does not have data to fill the fourth tile.

Since no data is missing im just going to fix this in the javascript by reducing the extent, so the dataless areas doesn't get rendered