960 VERBOSE = opts.verbose
965 saved_out = sys.stdout
966 if isinstance(opts.output, str):
967 filename = opts.output
968 opts.output = open(filename,
"w")
971 opts.output.write(
'BEGIN;\n')
974 if opts.create_raster_overviews_table:
976 opts.output.write(sql)
979 if opts.overview_level == 1:
983 opts.output.write(sql)
986 if opts.create_table
and opts.overview_level == 1:
988 opts.output.write(sql)
995 for infile
in opts.raster:
996 filelist = glob.glob(infile)
997 assert len(filelist) > 0,
"No input raster files found for '" +
str(infile) +
"'"
999 for filename
in filelist:
1000 logit(
"MSG: Dataset #%d: %s\n" % (i + 1, filename))
1007 if opts.index
and SUMMARY
is not None:
1009 opts.output.write(sql)
1012 opts.output.write(
'END;\n')
1015 if opts.vacuum
and SUMMARY
is not None:
1017 opts.output.write(sql)
1020 if opts.output != sys.stdout:
1021 sys.stdout = saved_out
1023 print(
"------------------------------------------------------------")
1024 print(
" Summary of GDAL to PostGIS Raster processing:")
1025 print(
"------------------------------------------------------------")
1027 m =
'%d (%s)' % (i, infile)
1030 print(
"Number of processed raster files: " + m)
1031 print(
"List of generated tables (number of tiles):")
1035 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)