File tree Expand file tree Collapse file tree
python/plugins/processing Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,10 +90,9 @@ def defineCharacteristics(self):
9090 self .tr ('Raster extent' ),
9191 optional = True ))
9292
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 ))
9796
9897 self .addParameter (ParameterString (self .OPTIONS ,
9998 self .tr ('Additional creation options' ),
@@ -151,10 +150,9 @@ def getConsoleCommands(self):
151150 arguments .append (regionCoords [1 ])
152151 arguments .append (regionCoords [3 ])
153152
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 )
158156
159157 if opts :
160158 arguments .append ('-co' )
Original file line number Diff line number Diff line change @@ -104,14 +104,8 @@ def scanraster(layer, feedback):
104104
105105
106106def 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 )
115109 return (int (pX ), int (pY ))
116110
117111
You can’t perform that action at this time.
0 commit comments