Changeset 4090 for spike/wktraster/scripts/gdal2wktraster.py
- Timestamp:
- 05/20/09 03:42:57 (3 years ago)
- Files:
-
- 1 modified
-
spike/wktraster/scripts/gdal2wktraster.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
spike/wktraster/scripts/gdal2wktraster.py
r4088 r4090 97 97 grp_r.add_option("-R", "--register", dest="register", action="store_true", default=False, 98 98 help="register the raster as a filesystem (out-db) raster") 99 grp_r.add_option("-O", "--overviews", dest="overviews", action="store_true", default=False, 100 help="Create overview tables named as ov_<RASTER TABLE>_<LEVEL> and populate with GDAL-provided overviews (available for regular blocking only)") 99 grp_r.add_option("-O", "--overviews", dest="overviews", action="store_true", default=False, 100 help='Create overview tables named as ov_<RASTER TABLE>_<LEVEL> and ' 101 'populate with GDAL-provided overviews (regular blocking only)') 101 102 prs.add_option_group(grp_r); 102 103 103 104 # Optional parameters - database/table manipulation 104 grp_t = OptionGroup(prs, "Database processing",105 "Optional parameters used to manipulate database objects")106 grp_t.add_option( "-c", "--create", dest="create_table", action="store_true", default=False,107 help= "create new table and populate it with raster(s), this is the default mode")105 grp_t = OptionGroup(prs, 'Database processing', 106 'Optional parameters used to manipulate database objects') 107 grp_t.add_option('-c', '--create', dest='create_table', action='store_true', default=False, 108 help='create new table and populate it with raster(s), this is the default mode') 108 109 grp_t.add_option("-d", "--drop", dest="drop_table", action="store_true", default=False, 109 110 help="drop table, create new one and populate with raster(s)") … … 114 115 grp_t.add_option("-I", "--index", dest="index", action="store_true", default=False, 115 116 help="create a GiST index on the raster column") 117 grp_t.add_option('-V', '--create-raster-overviews', dest='create_raster_overviews_table', 118 action='store_true', default=False, 119 help='create RASTER_OVERVIEWS table used to store overviews metadata') 116 120 prs.add_option_group(grp_t); 117 121 … … 152 156 if opts.overviews and not opts.regular_blocking: 153 157 prs.error("regular blocking mode required to enable overviews support") 158 159 if opts.create_raster_overviews_table and opts.overviews is False: 160 prs.error('create table for RASTER_OVERVIEWS available only if overviews import requested') 154 161 155 162 # XXX: Now, if --band=Nth, then only Nth band of all specified rasters is dumped/imported … … 826 833 # Process raster overviews to hex binary, if requested 827 834 # 1. Recalculate grid size per overview, using original block size 828 # 2. Tile overview bands according to original block size 835 # 2. Tile overview bands according to original block size, 836 # add padding pixels/scanlines if necessary 829 837 if options.regular_blocking is True and options.overviews is True: 830 838 assert options.filename is False,'No support for off-db overviews' … … 911 919 912 920 # If overviews requested, CREATE TABLE raster_overviews 913 if opts. overviews:921 if opts.create_raster_overviews_table: 914 922 sql = make_sql_create_raster_overviews(opts) 915 923 opts.output.write(sql)
