[postgis-devel] [PostGIS] #2122: [raster] Real extent feature lost after metadata as views

Sandro Santilli strk at keybit.net
Mon Dec 3 08:05:59 PST 2012


On Mon, Dec 03, 2012 at 03:13:00PM +0000, Mateusz Loskot wrote:
> On 1 December 2012 16:03, Sandro Santilli <strk at keybit.net> wrote:
> >
> > In other words, is it really a problem if tiles exist which are
> > _smaller_ than the "official" tile size ? Why do you need NODATA
> > values rather than just NO values at all ?
[..]
> > I'm trying to understand this because having no padding at all
> > would solve the issue, in that the computed extent could be same
> > as the original extent...
> 
> If padding is not necessary, it would make blocksize_x|y actually
> represent max_blocksize_x|y, where smaller block sizes are allowed.

Right.

> Despite technically possible tohandle, it would complicate things though.
> Is actual blocksize < max_blocksize_x|y allowed only along the right and
> the bottom edge?

No, I think it should be allowed everywhere

> GDAL requires the same blocksize for all tiles in a GDALRasterBand
> 
> http://www.gdal.org/classGDALRasterBand.html#af2ee6fa0f675d7d52bc19f826d161ad6
> 
> I doubt it's possible for GDAL to cope with mixed blocksize.

I guess GDAL could just ensure the same blocksize when reading the rasters.
There's an ST_Resize function IIRC.

> In GDAL driver for PostGIS Raster, there is currently an explicit check
> that the "blocks" all have the same size, to imply regular blocking:
> 
> http://trac.osgeo.org/gdal/browser/trunk/gdal/frmts/postgisraster/postgisrasterdataset.cpp#L561

I think GDAL should use other means to tell if a raster table
is "regularly blocked" or not. For a start there's metadata
to lookup, and if that's too limiting the user could specify 
a tile size and the driver could check for NO tile to be bigger
in any direction.

--strk;



More information about the postgis-devel mailing list