Bug report #12827
Wrong length calculation from Python with new geometry classes
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | Marco Hugentobler | ||
Category: | - | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 20922 |
Description
Method length() of the QgsGeometry class now returns wrong length (namely, 1.0) for line features when used from Python. In same time identify tool and field calculator returns correct values.
Tested with two linear layers, one in projected CRS and second in geographical CRS, using next code:
l = iface.mapCanvas().currentLayer() for f in l.getFeatures(): print f.geometry().length()
Same code return correct values with QGIS 2.8
Tested under Linux, self-compiled QGIS master 13d67c0
Associated revisions
Fix geometry length and area calculation (fix #12827)
History
#1 Updated by Giovanni Manghi over 9 years ago
- Affected QGIS version changed from 2.8.2 to master
- Target version set to Future Release - High Priority
- Priority changed from Normal to Severe/Regression
#2 Updated by Nyall Dawson over 9 years ago
- Status changed from Open to Closed
Fixed in changeset e295c1fbb7b6e68e0d0088e50280950b39a2d942.