0

I've got a NDVI layer that I'm trying to clip with a vector file but when I try and use GDAL Tools clipper I get an error. That shows up like this:

What am I doing wrong? This is before I even pick the mask layer!

Traceback (most recent call last): File "C:/PROGRA~1/QUANTU~1/apps/qgis/./python/plugins\GdalTools\tools\widgetPluginBase.py", line 28, in someValueChanged self.emit(SIGNAL("valuesChanged(const QStringList &)"), self.getArguments()) File "C:/PROGRA~1/QUANTU~1/apps/qgis/./python/plugins\GdalTools\tools\doClipper.py", line 105, in getArguments return self.getArgsModeMask() File "C:/PROGRA~1/QUANTU~1/apps/qgis/./python/plugins\GdalTools\tools\doClipper.py", line 143, in getArgsModeMask if self.alphaBandCheck.isChecked(): TypeError: 'sip.methoddescriptor' object is not callable

Python version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]

QGIS version: 1.7.3-Wroclaw Wroclaw, 00624b3

Python path: ['C:\Users\dean.walker\.qgis\python\plugins\GeoCoding', 'C:\Users\dean.walker\.qgis\python\plugins\GeoCoding', 'C:/PROGRA~1/QUANTU~1/apps/qgis/./python', 'C:/Users/dean.walker/.qgis/python', 'C:/Users/dean.walker/.qgis/python/plugins', 'C:/PROGRA~1/QUANTU~1/apps/qgis/./python/plugins', 'C:\PROGRA~1\QUANTU~1\bin\python25.zip', 'C:\PROGRA~1\QUANTU~1\apps\Python25\DLLs', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib\plat-win', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib\lib-tk', 'C:\PROGRA~1\QUANTU~1\apps\qgis\bin', 'C:\PROGRA~1\QUANTU~1\apps\Python25', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib\site-packages', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib\site-packages\win32', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib\site-packages\win32\lib', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib\site-packages\Pythonwin', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib\site-packages\wx-2.8-msw-unicode', '/usr/share/qgis/python', 'C:\PROGRA~1\QUANTU~1\apps\qgis\python\plugins\fTools\tools']

4
  • could you please share the code itself?
    – f.ashouri
    Commented Nov 1, 2012 at 21:59
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. Commented Nov 2, 2012 at 0:40
  • Is the native CRS of the raster file the same as the native CRS of the vector file that you are using to clip it?
    – nhopton
    Commented Nov 2, 2012 at 8:34
  • No, the CRS are not the same for the files. One is 4326 and the other is 32611. How do I show you the code itself? I'm not familiar with how to do that. Commented Nov 2, 2012 at 15:50

1 Answer 1

2

The CRS of the raster layer and the CRS of the vector layer have to be the same. Probably the best thing to do is to reproject the vector layer (I'm guessing this is the EPSG:4326 one). Right-click on the layer in the layer panel and go Save As.. and select EPSG:32611 as the target CRS.

enter image description here

10
  • Still no good. Throwing the same error at me. Commented Nov 2, 2012 at 23:53
  • You've reprojected the vector layer so that it now has the same CRS as the raster layer. So, the next thing to do is to disable on-the-fly coordinate transformation and then load both layers. Can you confirm that if you do this the layers align properly on the screen? N.
    – nhopton
    Commented Nov 3, 2012 at 13:13
  • Yes, They line up with "on the fly projection" unchecked in the project properties. Commented Nov 3, 2012 at 14:31
  • 1
    Is it possible to post a link to the two files? I had several problems with QGIS 1.7.3 and it would be nice to try clipping in 1.8 (before suggesting that you upgrade). N.
    – nhopton
    Commented Nov 4, 2012 at 9:28
  • 1
    The raster clips as well as it can here, see picture added above. This was using the current QGIS Master under Ubuntu. I think it might be worth upgrading to QGIS 1.8.
    – nhopton
    Commented Nov 5, 2012 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.