Opened 5 years ago

Last modified 4 years ago

#1858 new enhancement

[raster] Raster dataset functionality

Reported by: bnordgren Owned by: pracine
Priority: medium Milestone: PostGIS Future
Component: raster Version: trunk
Keywords: Cc:

Description

I was playing around with a means of treating a table of raster data as if each row were a "block" in gdal or a tile in Java2D/JAI. The basic addition here is a "dataset" raster having only one band, where each "pixel" is a foreign key to the actual block with all the pixel data. Most operations are then two-phase: lookup the key in the "dataset", then perform the operation on the correct "block".

For this to work the way I wrote it, the table of raster blocks must have a "serial" primary key column. Also, it will only handle regularly tiled data (but tiles can be missing).

I'm attaching preliminary code for inferring a "dataset" from a pool of blocks having a filename field, code to read/write raster blocks and code to read/write pixels using the original (in file) pixel coordinates.

For this to represent an improvement, the "dataset" raster is going to have to be persisted in a table along with certain other information (srid, num_bands, pixel_types, nodata_values, etc.). Doing this with PostGIS functions rather than requiring all connecting applications to "roll-their-own" dataset constructs may aid interoperability.

The attached code is useful to get an idea of what will need to be stored in the "dataset table" (or view). Once the table is created, functions with smaller parameter lists can be fabricated because they can just reference the information in the table.

Enjoy.

Attachments (1)

raster_dataset.sql (17.7 KB) - added by bnordgren 5 years ago.

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by bnordgren

Attachment: raster_dataset.sql added

comment:1 Changed 5 years ago by pracine

Summary: Raster dataset functionality[raster] Raster dataset functionality

comment:2 Changed 4 years ago by dustymugs

Milestone: PostGIS 2.1.0PostGIS Future
Version: 2.0.xtrunk
Note: See TracTickets for help on using tickets.