[QGIS-trac] [Quantum GIS] #2679: QGIS in conjunction with GEOS-3.2.2 produces wrong geometries with Python

Quantum GIS qgis at qgis.org
Mon Apr 26 06:32:31 EDT 2010


#2679: QGIS in conjunction with GEOS-3.2.2 produces wrong geometries with Python
------------------------------------------------+---------------------------
   Reporter:  hdus                              |              Owner:  nobody       
       Type:  bug                               |             Status:  new          
   Priority:  major: does not work as expected  |          Milestone:  Version 1.5.0
  Component:  Vectors                           |            Version:  HEAD         
   Keywords:                                    |   Platform_version:               
   Platform:  RedHat                            |           Must_fix:  Yes          
Status_info:  0                                 |  
------------------------------------------------+---------------------------
 With GEOS-3.2.2 the PyQgis-Code snippet below produces wrong coordinate
 pairs. The wrong output of str(k) p.e. is:

 (226020,226020)
 (226023,226023)
 (226024,226024)

 with GEOS-3.1.0 the correct value pairs are produced:

 (621500,226020)
 (621503,226023)
 (621510,226024)


 {{{
    mRubberBand = QgsRubberBand(self.iface.mapCanvas())
    g = QgsGeometry.fromWkt(geometry)
     if geometryType == "MULTIPOLYGON":
       for i in g.asMultiPolygon():
         index = 0
         for n in i:
           for k in n:
             mRubberBand.addPoint(k,  False,  index)
             print str(k)
           index = index + 1
 }}}

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