[Qgis-user] QGIS Image Clipper Plugin Available

Bruce, Bob (CON) Bob.Bruce at gov.mb.ca
Tue Sep 1 14:23:37 PDT 2009


Thanks to everyone who has tested this. I made a problem report on Wed
2009-08-26 9:22 AM under the subject line:

 

"[Qgis-user] QGIS API QgsMapToolEmitPoint Is Not Working Now andQGIS
Crashes"

 

When the image clipper plugin stopped working for me. I tracked the
problem down to the point where it was going to grab the location of
mouse clicks on the canvas. Unfortunately I couldn't figure out why this
was happening because I believed that I was following the right
procedures according to the documentation. I never did get any response
to this query but I didn't worry about this then because all of my
existing installations were working OK. Now I just tried updating my
OSGEO4W installation with the latest version of QGIS and I am getting
this problem on this workstation. So it seems to be related to something
to the way that I am getting the mouse pointing. And it the problem only
appears after I upgrade the installations (or install a new download)
using OSGEO4W.

 

Hopefully someone who is smarter that I am about this stuff can spot
what is causing the trouble.

 

Incidentally, I developed this with version 1.1 of QGIS and tried
testing it with 1.0.2 and it didn't work there, so I assume that
something wasn't available in the API for version 1.0.2.

 

            Bob Bruce

 

Here is the report that I made earlier:

 

Something strange is happening, a plugin that was working before has
stopped working for me now. I recently set up a new Windows XP system
(which has been fully patched) and then installed QGIS 1.0, 1.1.0 and

1.2 along with the libraries using the OSGEO4W installer. It has been
two months since I have been using this plugin but I don't suppose that
the API has changed in that time?

 

When I run my plugin in QGIS 1.1.0 (Pan) the Python code in the plugin
enables the mouse clicks on the canvas to be captured and when I move
the cursor on the mapcanvas I see a cross-hair cursor but as soon as I
click on the canvas a Windows dialog appears with the message "qgis.exe
has encountered a problem and needs to close" and QGIS crashes. The slot
function never seems to be entered because the QMessageBox at the top of
it never appears before the crash. Shown below is a snippet of my Python
code in which I have added some calls to QMessageBox in the function
setUpRubberBanding and these get called but the message box in
setClipWindow never gets called before the crash.

 

What would be causing this QGIS crash?

 

thanks,

             Bob Bruce

 

     def setUpRubberBanding(self):

         -

         -

         (ommitted code)

         -

         -

         self.canvas = self.iface.mapCanvas()

         QMessageBox.information(self,'ImageClipperDlg - ClipImage','In

Function: setUpRubberBanding'+\

         ' Map Canvas Scale = "' + str(self.canvas.scale()) + '"')

         self.emitPoint = QgsMapToolEmitPoint(self.canvas)

         self.canvas.setMapTool(self.emitPoint)

         QMessageBox.information(self,'ImageClipperDlg - ClipImage','In

Function: setUpRubberBanding'+\

                                 ' about to connect signal
"canvasClicked"')

         QObject.connect(self.emitPoint, SIGNAL("canvasClicked(QgsPoint
&, Qt::MouseButton)"), self.setClipWindow)

         self.isEmittingPoint = True

 

     def setClipWindow(self, point, button):

         QMessageBox.information(self,'ImageClipperDlg -
ClipImage','Entered Function: setClipWindow')

 

 

 

 

 

________________________________

From: qgis-user-bounces at lists.osgeo.org
[mailto:qgis-user-bounces at lists.osgeo.org] On Behalf Of G. Allegri
Sent: Tuesday, September 01, 2009 8:18 AM
To: Swapnil Chaudhari
Cc: qgis-user at lists.osgeo.org
Subject: Re: [Qgis-user] QGIS Image Clipper Plugin Available

 

It crashes my qgis trunk (1.3.0) from osgeo4w...
I've no time to debug it now, I will try as soon as I find a bit of time

giovanni

2009/9/1 Swapnil Chaudhari <sslan at rediffmail.com>

Hi Bob, 
Can you please check its compatibility with QGIS 1.0.2 Kore? It gives me
compatibility problem error. 
Thanks 
Best, 
Swapnil
On Mon, 31 Aug 2009 08:33:35 +0530 wrote


>Hi:
I have a plugin available that people may be interested in testing. 
This can be used to extract and combine portions of one or more image 
layers in QGIS. I have only used this on Windows but hopefully it would 
work OK in Linux also. You can get it and some test data by going to the

page: http://www.mappinggeek.ca/QGISPythonPlugins/Bobs-QGIS-plugins.xml 
. We have been using this plugin a lot at my workplace to extract the 
useable portions of scanned photography that we have georeferenced using

the GDAL Georeferencer plugin.

There is also the zoom-to-point plugin that I have tweaked to work 
better with zoom levels.

Bob Bruce

No virus found in this outgoing message.
Checked by AVG - www.avg.com 
Version: 8.5.409 / Virus Database: 270.13.71/2335 - Release Date:
08/30/09 06:36:00

_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

 
<http://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/
signatureline.htm at Middle?> 


_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20090901/00760761/attachment.html>


More information about the Qgis-user mailing list