File tree Expand file tree Collapse file tree 2 files changed +8
-16
lines changed
python/plugins/processing Expand file tree Collapse file tree 2 files changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -90,10 +90,9 @@ def defineCharacteristics(self):
90
90
self .tr ('Raster extent' ),
91
91
optional = True ))
92
92
93
- if GdalUtils .version () >= 2000000 :
94
- self .addParameter (ParameterCrs (self .EXT_CRS ,
95
- self .tr ('CRS of the raster extent, leave blank for using Destination SRS' ),
96
- optional = True ))
93
+ self .addParameter (ParameterCrs (self .EXT_CRS ,
94
+ self .tr ('CRS of the raster extent, leave blank for using Destination SRS' ),
95
+ optional = True ))
97
96
98
97
self .addParameter (ParameterString (self .OPTIONS ,
99
98
self .tr ('Additional creation options' ),
@@ -151,10 +150,9 @@ def getConsoleCommands(self):
151
150
arguments .append (regionCoords [1 ])
152
151
arguments .append (regionCoords [3 ])
153
152
154
- if GdalUtils .version () >= 2000000 :
155
- if rastext_crs :
156
- arguments .append ('-te_srs' )
157
- arguments .append (rastext_crs )
153
+ if rastext_crs :
154
+ arguments .append ('-te_srs' )
155
+ arguments .append (rastext_crs )
158
156
159
157
if opts :
160
158
arguments .append ('-co' )
Original file line number Diff line number Diff line change @@ -104,14 +104,8 @@ def scanraster(layer, feedback):
104
104
105
105
106
106
def mapToPixel (mX , mY , geoTransform ):
107
- try :
108
- # GDAL 1.x
109
- (pX , pY ) = gdal .ApplyGeoTransform (
110
- gdal .InvGeoTransform (geoTransform )[1 ], mX , mY )
111
- except TypeError :
112
- # GDAL 2.x
113
- (pX , pY ) = gdal .ApplyGeoTransform (
114
- gdal .InvGeoTransform (geoTransform ), mX , mY )
107
+ (pX , pY ) = gdal .ApplyGeoTransform (
108
+ gdal .InvGeoTransform (geoTransform ), mX , mY )
115
109
return (int (pX ), int (pY ))
116
110
117
111
You can’t perform that action at this time.
0 commit comments