Bug report #7021

Line Intersection tool produces error when using jus one input layer

Added by Sibi Prabakaran over 1 year ago. Updated over 1 year ago.

Status:Closed Start Date:01/21/2013
Priority:Normal Due date:
Assigned to:Sibi Prabakaran % Done:

100%

Category:fTools
Target version:-
Platform:Ubuntu Linux Patch supplied:No
Platform version:12.04 LTS 32 bit Affected version:master
Status info: Causes crash or corruption:No
Resolution: Tag:

Description

I'm using Quantum GIS version 1.8.0-Lisboa and trying to create intersection point using Intersection tool. (Vector -> Analysis tools -> Line Intersections )

I'm using Ubuntu Linux, version 12.04.

But when I do that for my shapefile, It pops up the following error in the dialog box:

An error has occured while executing Python code:

Traceback (most recent call last):
  File "/usr/share/qgis/python/plugins/fTools/tools/doIntersectLines.py", line 96, in accept
    self.compute(line1, line2, field1, field2, outPath, self.progressBar)
  File "/usr/share/qgis/python/plugins/fTools/tools/doIntersectLines.py", line 174, in compute
    outFeat.addAttribute(0, atMap1[index1])
KeyError: 0

Python version:
2.7.3 (default, Aug  1 2012, 05:27:35) 
[GCC 4.6.3]

QGIS version:
1.8.0-Lisboa Lisboa, exported

Python path: ['/usr/share/qgis/python', '/home/sibi/.qgis//python', '/home/sibi/.qgis//python/plugins', '/usr/share/qgis/python/plugins', '/usr/local/lib/python2.7/dist-packages/identi-0.1.3-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/pyipmsg-0.0.1.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages', '/usr/local/lib/python2.7/dist-packages/rope-0.9.4-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/ropemode-0.2-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/ropemacs-0.7-py2.7.egg', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone-client', '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel', '/usr/lib/python2.7/dist-packages/ubuntuone-couch', '/usr/lib/python2.7/dist-packages/ubuntuone-installer', '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol', '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode', '/usr/share/qgis/python/plugins/fTools/tools']

Shapefile.tar (10 kB) Sibi Prabakaran, 01/21/2013 11:05 am


Related issues

related to QGIS Application - Bug report #7073: Intersection Tool Produces two Intersection points on the... Closed 01/29/2013

Associated revisions

Revision 298f0c000e041795390ae4759ae01572f9d677e5
Added by Jürgen Fischer over 1 year ago

cleanup doIntersectLines.py and fix #7021

History

Updated by Giovanni Manghi over 1 year ago

  • Category set to fTools

please attach sample data. thanks!

Updated by Sibi Prabakaran over 1 year ago

It didn't work for me for any of the shapefiles I tried. Anyway, I have attached a simple shapefile which produces the same error for me.

Thanks!

Updated by Giovanni Manghi over 1 year ago

  • Subject changed from Line Intersection tool produces Error to Line Intersection tool produces error when using jus one input layer
  • Affected version changed from 1.8.0 to master

Sibi Prabakaran wrote:

It didn't work for me for any of the shapefiles I tried. Anyway, I have attached a simple shapefile which produces the same error for me.

Thanks!

the tool seems to work only with two different input layers, anyway it should not give a python error or it should also work within the same layer.

Updated by Sibi Prabakaran over 1 year ago

  • Assigned to set to Sibi Prabakaran
  • % Done changed from 0 to 100

Pull has been submitted in Github for patching it up.

Pull Request URL: https://github.com/qgis/Quantum-GIS/pull/404

Updated by Jürgen Fischer over 1 year ago

  • Status changed from Open to Closed

Also available in: Atom PDF