Show
Ignore:
Timestamp:
06/26/09 07:30:20 (3 years ago)
Author:
mloskot
Message:

[wktraster] gdal2wktraster: fixed bug in using name of base raster table as name of overview table; fixed validation of cmd line params to enable creation of RASTER_OVERVIEWS (Ticket #200)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • spike/wktraster/scripts/gdal2wktraster.py

    r4228 r4230  
    8181                    "file required. You may use wildcards (?,*) for specifying multiple files.") 
    8282    grp0.add_option("-t", "--table", dest="table", action="store", default=None, 
    83          help="raster destination in form of [<schema>.]<table>, required") 
     83         help="raster destination in form of [<schema>.]<table> or base raster table for overview level>1, required") 
    8484    prs.add_option_group(grp0); 
    8585 
     
    157157        prs.error("regular blocking mode required to enable overviews support (level > 1)") 
    158158 
    159     if opts.create_raster_overviews_table and opts.overview_level > 1: 
     159    if opts.create_raster_overviews_table and opts.overview_level <= 1: 
    160160        prs.error('create table for RASTER_OVERVIEWS available only if overviews import requested') 
    161161 
     
    902902            # INSERT INTO 
    903903            check_hex(hexwkb) # TODO: Remove to not to decrease performance 
    904             sql = make_sql_insert_raster(options.table, options.column, hexwkb, options.filename, file) 
     904            sql = make_sql_insert_raster(gen_table, options.column, hexwkb, options.filename, file) 
    905905            options.output.write(sql) 
    906906            tile_count = tile_count + 1