916 """Writes given raster dataset using GDAL features into HEX-encoded of
917 WKB for WKT Raster output."""
919 assert infile
is not None,
"Input file is none, expected file name"
920 assert options.version == g_rt_version,
"Error: invalid WKT Raster protocol version"
921 assert options.endian == NDR,
"Error: invalid endianness, use little-endian (NDR) only"
922 assert options.srid >= -1,
"Error: do you really want to specify SRID = %d" % options.srid
925 ds = gdal.Open(infile, gdalc.GA_ReadOnly);
927 sys.exit(
'Error: Cannot open input file: ' + str(infile))
932 if options.band
is not None and options.band > 0:
933 band_range = ( options.band, options.band + 1 )
935 band_range = ( 1, ds.RasterCount + 1 )
939 if previous_gt
is not None:
940 if previous_gt[1] != current_gt[1]
or previous_gt[5] != current_gt[5]:
941 sys.exit(
'Error: Cannot load raster with different pixel size in the same raster table')
945 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)