[QGIS-trac] Re: [Quantum GIS] #2987: Auto GCP detection library

Quantum GIS qgis at qgis.org
Tue Sep 28 11:47:55 EDT 2010


#2987: Auto GCP detection library
--------------------------------+-------------------------------------------
   Reporter:  jamesm6162        |              Owner:  timlinux     
       Type:  patch             |             Status:  assigned     
   Priority:  minor: annoyance  |          Milestone:  Version 1.6.0
  Component:  C++ Plugins       |            Version:  Trunk        
   Keywords:                    |   Platform_version:               
   Platform:  Debian            |           Must_fix:  No           
Status_info:  0                 |  
--------------------------------+-------------------------------------------

Comment(by timlinux):

 A couple more comments:

 - please remember the last used directory so opening rasters doesnt
 require so much navigation through the file system
 - for the selection of CRS, please follow the 'principle of least
 surprise' and use the existing one in QGIS - its available via the python
 api too.
 - the processing seems to write temporary files into the image directory -
 it would probably be neater to use the system /tmp directory - Qt will
 give you in a cross platform manner - see QString QDir::tempPath ()
 - On further testing I am getting a crash - see stack trace below:


 Crash:

 {{{
 [Thread 0x7fffbffff710 (LWP 9076) exited]
 Debug: QgsProjectionManager::setProjectionInformation - Could not find
 specified projections.
 Debug: qgsautogcpmanager.cpp: (QgsAutoGCPManager::extractControlPoints())
 Starting Control Point Extraction
 Debug: Analyzer Starting GCP extraction
 Debug: Levels: 5
 Features detected: 103132
 Debug: Dividing image into 7 X 7 grids
 Debug: Extracting GCP Chips
 Debug: Analyzer Starting GCP extraction
 Debug: Levels: 5
 Features detected: 55788
 Debug: Dividing image into 1001 X 1001 grids
 Debug: Extracting GCP Chips

 Program received signal SIGSEGV, Segmentation fault.
 0x00007fffd3731d96 in QList<QgsGCP*>::detach (this=0x19ebc580) at
 /usr/include/qt4/QtCore/qlist.h:122
 122         inline void detach() { if (d->ref != 1) detach_helper(); }
 (gdb) bt
 #0  0x00007fffd3731d96 in QList<QgsGCP*>::detach (this=0x19ebc580) at
 /usr/include/qt4/QtCore/qlist.h:122
 #1  0x00007fffd3731947 in QList<QgsGCP*>::append (this=0x19ebc580,
 t=@0x12859818) at /usr/include/qt4/QtCore/qlist.h:468
 #2  0x00007fffd350fbc1 in QList<QgsGCP*>::push_back (this=0x19ebc580,
 t=@0x12859818) at /usr/include/qt4/QtCore/qlist.h:277
 #3  0x00007fffd350f048 in QgsImageAnalyzer::QgsGrid::fillGrid
 (this=0x102ba660, gcpSet=0x4294010) at
 /home/timlinux/dev/cpp/qgis/src/autogcp/qgsimageanalyzer.cpp:505
 #4  0x00007fffd350d4fd in QgsImageAnalyzer::matchGcps (this=0x10c8fb0,
 gcpSet=0x490f990) at
 /home/timlinux/dev/cpp/qgis/src/autogcp/qgsimageanalyzer.cpp:121
 #5  0x00007fffd3507502 in QgsAutoGCPManager::matchControlPoints
 (this=0x4c0d710) at
 /home/timlinux/dev/cpp/qgis/src/autogcp/qgsautogcpmanager.cpp:119
 #6  0x00007fffd373b022 in meth_QgsAutoGCPManager_matchControlPoints
 (sipSelf=<QgsAutoGCPManager at remote 0x4302c88>, sipArgs=()) at
 sipautogcppart3.cpp:1281
 #7  0x00007fffd67fc030 in call_function (f=
     Frame 0x7b1afd0, for file
 /home/timlinux/.qgis/python/plugins/autogcp/autogcpguibase.py, line 1010,
 in matchGcps (self=<Ui_MainWindow(dockWidgetContents_2=<QWidget at remote
 0x42fca68>, dockWidgetContents_3=<QWidget at remote 0x4301160>,
 rawMapCanvas=<QgsMapCanvas at remote 0x4301380>, gcpRawHighlight=[],
 actionTest1=<QAction at remote 0x4302738>, menuSettings=<QMenu at remote
 0x421ae20>, actionTest2=<QAction at remote 0x4302848>,
 actionAbout=<QAction at remote 0x4301d98>, menubar=<QMenuBar at remote
 0x421ab78>, gcpListSrcY=[<QTableWidgetItem at remote 0x430c5a0>,
 <QTableWidgetItem at remote 0x430ca68>, <QTableWidgetItem at remote
 0x430cf30>, <QTableWidgetItem at remote 0x430d490>, <QTableWidgetItem at
 remote 0x430d958>, <QTableWidgetItem at remote 0x430de20>,
 <QTableWidgetItem at remote 0x430e380>, <QTableWidgetItem at remote
 0x430e848>, <QTableWidgetItem at remote 0x430ed10>, <QTableWidgetItem at
 remote 0x430f270>, <QTableWidgetItem at remote 0x430f738>,
 <QTableWidgetItem at remote 0x430fc00>, <QTableWidget...(truncated),
 throwflag=<value optimized out>) at ../Python/ceval.c:3750
 #8  PyEval_EvalFrameEx (f=
     Frame 0x7b1afd0, for file
 /home/timlinux/.qgis/python/plugins/autogcp/autogcpguibase.py, line 1010,
 in matchGcps (self=<Ui_MainWindow(dockWidgetContents_2=<QWidget at remote
 0x42fca68>, dockWidgetContents_3=<QWidget at remote 0x4301160>,
 rawMapCanvas=<QgsMapCanvas at remote 0x4301380>, gcpRawHighlight=[],
 actionTest1=<QAction at remote 0x4302738>, menuSettings=<QMenu at remote
 0x421ae20>, actionTest2=<QAction at remote 0x4302848>,
 actionAbout=<QAction at remote 0x4301d98>, menubar=<QMenuBar at remote
 0x421ab78>, gcpListSrcY=[<QTableWidgetItem at remote 0x430c5a0>,
 <QTableWidgetItem at remote 0x430ca68>, <QTableWidgetItem at remote
 0x430cf30>, <QTableWidgetItem at remote 0x430d490>, <QTableWidgetItem at
 remote 0x430d958>, <QTableWidgetItem at remote 0x430de20>,
 <QTableWidgetItem at remote 0x430e380>, <QTableWidgetItem at remote
 0x430e848>, <QTableWidgetItem at remote 0x430ed10>, <QTableWidgetItem at
 remote 0x430f270>, <QTableWidgetItem at remote 0x430f738>,
 <QTableWidgetItem at remote 0x430fc00>, <QTableWidget...(truncated),
 throwflag=<value optimized out>) at ../Python/ceval.c:2412
 #9  0x00007fffd67fdd60 in PyEval_EvalCodeEx (co=0x24727b0, globals=<value
 optimized out>, locals=<value optimized out>, args=0x1, argcount=<value
 optimized out>,
     kws=<value optimized out>, kwcount=0, defs=0x0, defcount=0,
 closure=0x0) at ../Python/ceval.c:3000
 #10 0x00007fffd6783d60 in function_call (func=<function at remote
 0x248b488>, arg=
     (<Ui_MainWindow(dockWidgetContents_2=<QWidget at remote 0x42fca68>,
 dockWidgetContents_3=<QWidget at remote 0x4301160>,
 rawMapCanvas=<QgsMapCanvas at remote 0x4301380>, gcpRawHighlight=[],
 actionTest1=<QAction at remote 0x4302738>, menuSettings=<QMenu at remote
 0x421ae20>, actionTest2=<QAction at remote 0x4302848>,
 actionAbout=<QAction at remote 0x4301d98>, menubar=<QMenuBar at remote
 0x421ab78>, gcpListSrcY=[<QTableWidgetItem at remote 0x430c5a0>,
 <QTableWidgetItem at remote 0x430ca68>, <QTableWidgetItem at remote
 0x430cf30>, <QTableWidgetItem at remote 0x430d490>, <QTableWidgetItem at
 remote 0x430d958>, <QTableWidgetItem at remote 0x430de20>,
 <QTableWidgetItem at remote 0x430e380>, <QTableWidgetItem at remote
 0x430e848>, <QTableWidgetItem at remote 0x430ed10>, <QTableWidgetItem at
 remote 0x430f270>, <QTableWidgetItem at remote 0x430f738>,
 <QTableWidgetItem at remote 0x430fc00>, <QTableWidgetItem at remote
 0x4310160>, <QTableWidgetItem at remote 0x4310628>, <QTableWidgetItem at
 remote 0x4310af0>, <QTableWidg...(truncated), kw=0x0) at
 ../Objects/funcobject.c:524
 #11 0x00007fffd67562e3 in PyObject_Call (func=<function at remote
 0x248b488>, arg=Traceback (most recent call last):
   File "/usr/lib/debug/usr/lib/libpython2.6.so.1.0-gdb.py", line 1054, in
 to_string
     pyop = PyObjectPtr.from_pyobject_ptr(self.gdbval)
   File "/usr/lib/debug/usr/lib/libpython2.6.so.1.0-gdb.py", line 343, in
 from_pyobject_ptr
     cls = cls.subclass_from_type(p.type())
   File "/usr/lib/debug/usr/lib/libpython2.6.so.1.0-gdb.py", line 288, in
 subclass_from_type
     tp_name = t.field('tp_name').string()
   File "/usr/lib/python2.6/encodings/utf_8.py", line 16, in decode
     return codecs.utf_8_decode(input, errors, True)

 }}}

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/2987#comment:6>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list