[QGIS-trac] [Quantum GIS] #2561: splitGeometry returns one part of the splitted line, instead of two

Quantum GIS qgis at qgis.org
Wed Mar 17 11:12:12 EDT 2010


#2561: splitGeometry returns one part of the splitted line, instead of two
---------------------------------------------------------+------------------
   Reporter:  gislab                                     |              Owner:  nobody       
       Type:  bug                                        |             Status:  new          
   Priority:  critical: causes crash or data corruption  |          Milestone:  Version 1.5.0
  Component:  Vectors                                    |            Version:  HEAD         
   Keywords:                                             |   Platform_version:               
   Platform:  Windows                                    |           Must_fix:  No           
Status_info:  0                                          |  
---------------------------------------------------------+------------------
 Easy to try on two intersecting lines (two nodes each)

 Sample code for python console (two lines are selected):

 {{{
 cl = qgis.utils.iface.mapCanvas().currentLayer()
 selfeats = cl.selectedFeatures()
 geom0 = QgsGeometry(selfeats[0].geometry())
 geom1 = QgsGeometry(selfeats[1].geometry())
 (res, newlist, topolist) = geom1.splitGeometry(pnts, False)
 }}}

 Resulting newlist contains only 1 object, one part of the line, should
 have 2.

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/2561>
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