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

Chris Hodgson chodgson at refractions.net
Fri Mar 27 09:15:39 PDT 2009


I would say that there is no good reason to create the smaller tiles. 
Space is the only reason I can imagine, and the tile size should already 
be small enough that relative to the overall data, the wasted space on 
the edges is not significant.

If you do create small tiles, then it creates additional problems when 
you later want to add to your raster with another image file ... either 
the smaller bits stay there and throw off the relative tiling of the 
next pieces, or you must remove the existing little tiles and copy their 
data to larger "regular size" tiles in order to append to the raster.

My feeling is there there is no reason to support non-regular blocking 
within the database, but instead we should support loading the database 
from non-regular (and possibly overlapping) tiles, forcing regularity 
within the database. The raster is defined to have a fixed blocking 
grid, and in order to put things into the database they must be re-tiled 
according to this grid.

While I recognize that the database itself cannot use the regular 
blocking to optimize its access to the data, external applications which 
are aware of the fact that the data is stored regularly within the 
database CAN optimize, by requesting data in chunks that match the db 
storage. Depending on the level of the application, it could ask the DB 
to crop the tiles and give it a single raster for the entire region of 
interest, or it could ask the DB for all of the tiles that overlap the 
region of interest... and perhaps cache them within the application, or 
align it's own internal blocking with the DB's.

I just don't see the benefit to supporting non-regular blocking within 
the DB.

Chris

Pierre Racine wrote:
>> Pierre, we have re-discussed things with Martin and we've
>> decided to implement -k with tile size specification:
>>
>> gdal2wktraster -k 256 256
>>     
>
> :-) again... What will happen if I do -k 100x100 on a 1020x1020 image? 
>
> There is two options:
>
> 1) you create some smaller tiles (braking regular blocking). (default)
>
> 2)  you fill the incomplete tiles with nodatavalue. This could be (yet) another option (add "n" after as in "100x100n") or add another "-" option. As you like...
>
> Pierre
>
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>   




More information about the postgis-devel mailing list