917 """Writes given raster dataset using GDAL features into HEX-encoded of
918 WKB for WKT Raster output."""
920 assert infile
is not None,
"Input file is none, expected file name"
921 assert options.version == g_rt_version,
"Error: invalid WKT Raster protocol version"
922 assert options.endian == NDR,
"Error: invalid endianness, use little-endian (NDR) only"
923 assert options.srid >= -1,
"Error: do you really want to specify SRID = %d" % options.srid
926 ds = gdal.Open(infile, gdalc.GA_ReadOnly);
928 sys.exit(
'Error: Cannot open input file: ' +
str(infile))
933 if options.band
is not None and options.band > 0:
934 band_range = ( options.band, options.band + 1 )
936 band_range = ( 1, ds.RasterCount + 1 )
940 if previous_gt
is not None:
941 if previous_gt[1] != current_gt[1]
or previous_gt[5] != current_gt[5]:
942 sys.exit(
'Error: Cannot load raster with different pixel size in the same raster table')
946 SUMMARY.append( summary )
def wkblify_raster_level(options, ds, level, band_range, infile, i)
def get_gdal_geotransform(ds)
def wkblify_raster(options, infile, i, previous_gt=None)