1 |
# Copyright (c) 2001-2005 by Intevation GmbH |
# Copyright (c) 2001-2006 by Intevation GmbH |
2 |
# Authors: |
# Authors: |
3 |
# Bernhard Herzog <[email protected]> (2001-2003) |
# Bernhard Herzog <[email protected]> (2001-2003) |
4 |
# Jonathan Coles <[email protected]> (2003) |
# Jonathan Coles <[email protected]> (2003) |
47 |
if Thuban.Model.resource.has_gdal_support(): |
if Thuban.Model.resource.has_gdal_support(): |
48 |
from gdalwarp import ProjectRasterFile |
from gdalwarp import ProjectRasterFile |
49 |
|
|
50 |
|
verbose = 0 # whether to talk more on stdout |
51 |
|
|
52 |
# Map the strings used for the format parameter of the draw_raster_data |
# Map the strings used for the format parameter of the draw_raster_data |
53 |
# method to the appropriate wxWindows constants |
# method to the appropriate wxWindows constants |
128 |
options = options & ~2 # ALPHA_MASK not supported |
options = options & ~2 # ALPHA_MASK not supported |
129 |
|
|
130 |
try: |
try: |
131 |
|
if verbose > 0: |
132 |
|
print "doing ProjectRasterFile '%s' -> '%s'" % \ |
133 |
|
(srcProj, dstProj) |
134 |
|
print "extents:", extents, "resolution:", resolution |
135 |
|
print "dimensions:", dimensions, "options:", options |
136 |
ret = ProjectRasterFile(layer.GetImageFilename(), |
ret = ProjectRasterFile(layer.GetImageFilename(), |
137 |
srcProj, dstProj, |
srcProj, dstProj, |
138 |
extents, resolution, dimensions, |
extents, resolution, dimensions, |