Opened 12 years ago

Last modified 11 years ago

#2679 new bug

QGIS in conjunction with GEOS-3.2.2 produces wrong geometries with Python

Reported by: hdus Owned by: nobody
Priority: major: does not work as expected Milestone: Version 1.7.0
Component: Vectors Version: Trunk
Keywords: Cc:
Must Fix for Release: No Platform: RedHat
Platform Version: Awaiting user input: yes

Description

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

Change History (3)

comment:1 Changed 12 years ago by pcav

Must Fix for Release: YesNo

Is this a QGIS error, or a GEOS one?

comment:2 Changed 11 years ago by pcav

Milestone: Version 1.5.0Version 1.6.0

Please check: if it is a GEOS bug, close this and forward it to the appropriate trac.

comment:3 Changed 11 years ago by jef

Awaiting user input: set
Note: See TracTickets for help on using tickets.