Changes between Version 25 and Version 26 of WKTRaster/SpecificationWorking01


Ignore:
Timestamp:
May 14, 2009, 9:11:04 AM (15 years ago)
Author:
mpd
Comment:

Added RASTER_OVERVIEWS section

Legend:

Unmodified
Added
Removed
Modified
  • WKTRaster/SpecificationWorking01

    v25 v26  
    268268
    269269It is permissable to for regular_blocking rasters to omit some blocks/tiles (sparse rasters) in which case the missing tiles should be assumed to be all nodata or zero valued.
     270
     271----
     272
     273== '''RASTER_OVERVIEWS Metadata Table''' ==
     274
     275If the RASTER_COLUMNS "regular_blocking" value is true then "all blocks are equal sized, abutted and non-overlapping, started at top left origin", plus additional constraints. This regular blocking capability raises the possibility of having very large contiguous raster coverages (made up of many individual WKTRaster-s) which, in turn, raises potential performance problems. Other raster formats counter this by having overviews; a concept that is already [http://www.gdal.org/gdaladdo.html supported] by [http://www.gdal.org/ GDAL].
     276
     277The following metadata table provides external applications and possibly internal tools the ability to discover tables that contain overview raster data, and to learn various information about those datasets.
     278
     279|| '''Column Name''' || '''Type''' || '''Constraints''' || '''Comments''' ||
     280|| o_table_catalog || character varying(256) || NOT NULL || ||
     281|| o_table_schema || character varying(256) || NOT NULL || ||
     282|| o_table_name || character varying(256) || NOT NULL || ||
     283|| o_column || character varying(256) || NOT NULL || Together define the column containing overview data ||
     284|| r_table_catalog || character varying(256) || NOT NULL || ||
     285|| r_table_schema || character varying(256) || NOT NULL || ||
     286|| r_table_name || character varying(256) || NOT NULL || ||
     287|| r_column || character varying(256) || NOT NULL || Together define the base raster coverage ||
     288|| out_db || boolean || NOT NULL || false if internal tiles, true if tiles are references to files outside the database ||
     289|| overview_factor || integer || NOT NULL || The integral factor of the overview, e.g. 2 means an overview is 1/2 resolution of the base raster coverage ||
     290
     291The following restrictions apply:[[BR]]
     292
     293 1. blocksize_x and blocksize_y for the overview are the same as that of the original, base raster coverage.
     294 1. pixelsize_x and pixelsize_y for the overview are calculated from the original, base raster coverage pixelsize_x and pixelsize_y (using overview_factor).
     295 1. Overviews should not be registered in the raster_columns metadata table.
     296 1. The raster_overviews metadata table can have more than one entry for any given base raster coverage, but they must all have different overview_factor values, e.g. 2, 4, 8, 16, etc.
     297
     298No provision is provided, or suggested, for creating, updating, or deleting overviews.
     299
     300==== '''Pros''' ====
     301
     302 1. Overviews and base raster data tables are independent of each other, so overviews do not muddy the water for casual queries ("SELECT * FROM RASTER_COLUMNS").
     303 1. Overview and base raster data metadata will always match.
     304
     305==== '''Cons''' ====
     306
     307 1. Two metadata tables instead of one.
     308 1. Overviews have to share blocksizes with the base raster column.
     309
     310=== '''Alternative Overviews Metadata''' ===
     311
     312An alternative design is to extend the RASTER_COLUMNS metadata table with the following columns:
     313
     314|| '''Column Name''' || '''Type''' || '''Constraints''' || '''Comments''' ||
     315|| or_table_catalog || character varying(256) || NOT NULL || ||
     316|| or_table_schema || character varying(256) || NOT NULL || ||
     317|| or_table_name || character varying(256) || NOT NULL || ||
     318|| or_column || character varying(256) || NOT NULL || Together define the original ("or_") raster coverage ||
     319|| overview_factor || integer || NOT NULL || The integral factor of the overview, e.g. 2 means an overview is 1/2 resolution of the base raster coverage ||
     320
     321The overview_factor column could be removed by enforcing a divide by two rule, each overview being half the resolution of its parent.
     322
     323Original rasters would be queried like this:
     324
     325 SELECT * FROM raster_columns WHERE overview_factor = 0
     326
     327Overview rasters would be queried like this:
     328
     329 SELECT * FROM raster_columns WHERE or_table_name = 'myraster'
     330
     331==== '''Pros''' ====
     332
     333 1. Only one metadata table.
     334 1. Overviews can have blocksizes independent of their base raster data.
     335
     336==== '''Cons''' ====
     337
     338 1. A casual metadata query ("SELECT * FROM RASTER_COLUMNS") will return overviews and base raster data.
     339 1. Metadata for base data and overviews could conflict, e.g. different SRID-s, mis-matched pixelsizes, etc.
     340
     341----
    270342
    271343== '''Specification Comments following the Code Sprint''' ==