PostGIS  2.5.0dev-r@@SVN_REVISION@@
rtrowdump.py File Reference

Go to the source code of this file.

Namespaces

 rtrowdump
 

Functions

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

Variables

tuple rtrowdump.prs
 
string rtrowdump.help = "PostgreSQL database connection string, required"
 
 rtrowdump.VERBOSE = opts.verbose
 
tuple rtrowdump.rt = rtreader.RasterReader(opts.db, opts.table, opts.column, opts.where)
 
string rtrowdump.out_format = "GTiff"
 
tuple rtrowdump.out_driver = gdal.GetDriverByName(out_format)
 
tuple rtrowdump.out_data_type = pt2gdt(rt.pixel_types[0])
 
tuple rtrowdump.out_ds = out_driver.Create(opts.output, rt.width, rt.height, rt.num_bands, out_data_type)
 
tuple rtrowdump.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 rtrowdump.pixel = rt.get_value(b, width_index + 1, height_index + 1)
 
tuple rtrowdump.band = out_ds.GetRasterBand(b)