[postgis-users] Rasters (once more)

Patrick pvanlaake at users.sourceforge.net
Sat Oct 15 05:47:41 PDT 2005


Hi all,

Is it just me, or did the rasters-in-PostGIS discussion die ungracefully in 
my absence? (Two weeks without internet, can you imagine that in this day 
and age?)

Anyway, I did fiddle around with PostgreSQL and a basic data model and I 
even got a prototype working. Rasters are abstracted to a 3-level hierarchy: 
raster dataset, raster band, and tile. Tiling is band-specific. Following 
OGC, rasters are assumed to be immutable once created, i.e. number of rows 
and columns, pixel size and band data types are fixed. (This greatly 
simplifies concurrent access.) Rasters can have any number of bands 
(including 0). Raster bands can have any datatype, except complex which is 
not an OGC type anyway. Tile data is stored in a bytea field. Tiles are 
created only when there is some data to be stored. An absent tile is assumed 
to be composed of NULL data entirely.

I have some code available in Pascal (yes folks, I use Delphi and I'm loving 
it) and I will post that on the net within a week or so, with a sample app 
(for Win32). I suppose the C  people in this group will be able to read the 
code (or at least the SQL part of it {;-).

The code that I have is storage only, and it does not yet have anything in 
common with PostGIS other than the srid field and thus the link to 
spatial_ref_sys. There are no functions of any kind, no tiling, no 
extraction of arbitrary areas, no clipping using geometries, no pyramids, no 
stats, etc. This is just meant as a starting point for further discussion. 
To give you an idea of discussion points beyond my basic design:

* How to integrate palettes? Externally using a reference field or 
internally in the raster band record as a binary field?
* How to integrate attributes for ordinal data types?
* Should tiles have a fixed size globally, be fixed system-wide, for a the 
raster, or establish it at the level of the band? How does the answer to 
this question bear on implementing OGC GC evaluate* methods?
* How to support clipping with geometries and boxes?

Etc etc etc.

More to come, soon,
Patrick 






More information about the postgis-users mailing list