[postgis-devel] [PostGIS] #200: Resolution reduction built-in to gdal2wktraster script

PostGIS trac at osgeo.org
Wed Jun 17 08:52:16 PDT 2009


#200: Resolution reduction built-in to gdal2wktraster script
---------------------------------------------------+------------------------
 Reporter:  mloskot                                |       Owner:  pracine
     Type:  task                                   |      Status:  new    
 Priority:  high                                   |   Milestone:         
Component:  wktraster                              |     Version:  trunk  
 Keywords:  overview,pyramid,resolution,reduction  |  
---------------------------------------------------+------------------------
 Current version (r4163) of
 [source:spike/wktraster/scripts/gdal2wktraster.py at 4163 gdal2wktraster.py]
 only generates tables with overviews if these are available in input
 dataset. In other words, users need to generate overviews first, i.e.
 using [http://gdal.org/gdaladdo.html gdaladdo], and then gdal2wktraster
 can dump these overviews to tables.

 This task is to enhance the loader to rely on cool features of
 [http://www.gdal.org/classGDALDataset.html RasterIO]. So, if overview
 generation is requested and overview level (a reduction factor, see notes
 below) is specified:

  * and the input raster does consist of overviews, then RasterIO will
 automa(t|g)ically fetch pixel data from overview matching given level at
 ''best''.

  * but no overviews are available in the input raster, then RasterIO will
 apply raster decimation on source window, so it's simply and properly
 ''downsampled''.

 If specified overview factor is higher than '''1''' (i.e. 2, 4, ...) then
 size of output raster requested from ''RasterIO'' operation is adequately
 '''smaller''' than size of source raster. This difference will trigger
 raster downsampling.

 Currently, ''gdal2wktraster'' dumps all available overview during single
 execution of the script. It will change. The enhanced version will
 generate only one type of raster output at once: base raster ('''level =
 1''') or overview ('''level > 1''').

 I believe it's an advantage because it is a long process to dump large
 raster. The new version will open it to allow execution of parallel
 processes.

 The main goal of this ticket is to ''mark a snapshot'' of gdal2wktraster
 between major modifications, so it's easier to find and use
 [source:spike/wktraster/scripts/gdal2wktraster.py at 4163 old version] if
 desirable.

 Work in progress.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/200>
PostGIS <http://trac.osgeo.org/postgis/>
PostGIS


More information about the postgis-devel mailing list