Changes between Version 44 and Version 45 of WKTRaster/GDALDriverSpecificationWorking
- Timestamp:
- 04/15/12 07:14:49 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WKTRaster/GDALDriverSpecificationWorking
v44 v45 77 77 * Determine, in a 1st, very fast query to the db, by looking in the raster_overview view, what lower resolution table are available for the requested raster table 78 78 * Determine, in a 2nd, fast enough query to the db, the extent and the maximum number of bands of the requested raster be aggregating the extents of all the rasters. This takes about 1 second on 360000 tiles even if there is no index. 79 80 Example: 81 82 {{{ 83 SELECT ST_XMin(geom) xmin, 84 ST_YMin(geom) ymin, 85 ST_XMax(geom) xmax, 86 ST_YMax(geom) ymax, 87 nbband 88 FROM (SELECT ST_Extent(rast::geometry) geom, 89 max(ST_NumBands(rast)) nbband 90 FROM your_schema.raster_table 91 ) foo 92 }}} 93 94 79 95 * Determine, in a 3rd, very fast query to the db, the pixel size & rotation, the band types and the nodata value for each band of ONLY ONE raster (LIMIT 1). The driver should assume those values will be the same for every other rasters in the table. If when fetching the other tiles, it realizes one does not, we must say that we do not support this arrangement. (I'm still a bit perplex about the nodata value though.) 96 97 Example: 98 99 {{{ 100 101 SELECT ST_ScaleX(rast) scalex, 102 ST_ScaleY(rast) scaley, 103 ST_SkewX(rast) skewx, 104 ST_SkewY(rast) skewy, band, 105 ST_BandPixelType(rast, band), 106 ST_BandNodataValue(rast, band) 107 FROM (SELECT rast, generate_series(1, ST_NumBands(rast)) band 108 FROM your_schema.raster_table LIMIT 1 109 ) foo 110 }}} 111 112 80 113 81 114 '''Open Question''': If in the first query we find a lower resolution table, does the rest of the work must be performed with this lower resolution table? At least these 3 queries, until we want to read the actual raster data to burn it into the buffer. The queries should be faster in an overview table, but the pixel size will not be the same using an overview table instead the normal resolution table. And you don't read from overviews unless you want to implement decimation because your buffer size is different from your raster size. Am I right?