959 VERBOSE = opts.verbose
964 saved_out = sys.stdout
965 if type(opts.output)
is str:
966 filename = opts.output
967 opts.output = open(filename,
"w")
970 opts.output.write(
'BEGIN;\n')
973 if opts.create_raster_overviews_table:
975 opts.output.write(sql)
978 if opts.overview_level == 1:
982 opts.output.write(sql)
985 if opts.create_table
and opts.overview_level == 1:
987 opts.output.write(sql)
994 for infile
in opts.raster:
995 filelist = glob.glob(infile)
996 assert len(filelist) > 0,
"No input raster files found for '" + str(infile) +
"'"
998 for filename
in filelist:
999 logit(
"MSG: Dataset #%d: %s\n" % (i + 1, filename))
1006 if opts.index
and SUMMARY
is not None:
1008 opts.output.write(sql)
1011 opts.output.write(
'END;\n')
1014 if opts.vacuum
and SUMMARY
is not None:
1016 opts.output.write(sql)
1019 if opts.output != sys.stdout:
1020 sys.stdout = saved_out
1022 print "------------------------------------------------------------"
1023 print " Summary of GDAL to PostGIS Raster processing:"
1024 print "------------------------------------------------------------"
1026 m =
'%d (%s)' % (i, infile)
1029 print "Number of processed raster files: " + m
1030 print "List of generated tables (number of tiles):"
1034 print "%d\t%s (%d)" % (i, s[0], s[1])
def make_sql_create_table(options, table=None, is_overview=False)
def make_sql_vacuum(table)
def make_sql_drop_raster_table(table)
def make_sql_create_gist(table, column)
def make_sql_create_raster_overviews(options)
def wkblify_raster(options, infile, i, previous_gt=None)