We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 107d30a commit 29bf95cCopy full SHA for 29bf95c
python/plugins/processing/tools/raster.py
@@ -64,8 +64,14 @@ def scanraster(layer, progress):
64
65
66
def mapToPixel(mX, mY, geoTransform):
67
- (pX, pY) = gdal.ApplyGeoTransform(
68
- gdal.InvGeoTransform(geoTransform)[1], mX, mY)
+ try:
+ # GDAL 1.x
69
+ (pX, pY) = gdal.ApplyGeoTransform(
70
+ gdal.InvGeoTransform(geoTransform)[1], mX, mY)
71
+ except TypeError:
72
+ # GDAL 2.x
73
74
+ gdal.InvGeoTransform(geoTransform), mX, mY)
75
return (int(pX), int(pY))
76
77
0 commit comments