[postgis-devel] [WKT Raster] Regular blocking in gdal2wktraster.py

Mateusz Loskot mateusz at loskot.net
Sat Mar 28 07:00:09 PDT 2009


Frank Warmerdam wrote:
> Mateusz Loskot wrote:
>> From GDAL manual:
>>
>> "The block size is used to establish a natural or efficient block size
>> to access the data with. For tiled datasets this will be the size of a
>> tile, while for most other datasets it will be one scanline, as in this
>> case."
> 
> Mateusz,
> 
> At the code sprint we talked about either using tiles small enough to fit
> into one postgres page (8K) so perhaps 64x64 for 1band 8bit images or 48x48
> for RGB 8bit data.
> 
> Alternatively, we might use fairly large tiles to amortize the expensive
> BLOB access mechanism in Postgres.

Frank,

Yes, that's a good point. Recent changes to gdal2wktraster allows us to
build such tables:

gdal2wktraster -r land.tif -t land -o land.sql -k -m 64x64

or -m 48x48

Certainly, assuming 64x64 is a normalized block according to
RasterXSize and RasterYSize:

RasterXSize % 64 = 0
RasterYSize % 64 = 0

Hopefully, it does make sense.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org



More information about the postgis-devel mailing list