PostGIS  2.2.7dev-r@@SVN_REVISION@@
rtrowdump Namespace Reference

Functions

def logit (msg)
 
def pt2gdt (pt)
 
def pt2numpy (pt)
 

Variables

tuple prs
 
string help = "PostgreSQL database connection string, required"
 
 VERBOSE = opts.verbose
 
tuple rt = rtreader.RasterReader(opts.db, opts.table, opts.column, opts.where)
 
string out_format = "GTiff"
 
tuple out_driver = gdal.GetDriverByName(out_format)
 
tuple out_data_type = pt2gdt(rt.pixel_types[0])
 
tuple out_ds = out_driver.Create(opts.output, rt.width, rt.height, rt.num_bands, out_data_type)
 
tuple raster = numpy.zeros((rt.height, rt.width), pt2numpy(out_data_type))
 Be careful!! Zeros function's input parameter can be a (height x width) array, not (width x height): http://docs.scipy.org/doc/numpy/reference/generated/numpy.zeros.html?highlight=zeros#numpy.zeros. More...
 
tuple pixel = rt.get_value(b, width_index + 1, height_index + 1)
 
tuple band = out_ds.GetRasterBand(b)