Skip to main content
5 events
when toggle format what by license comment
Jan 19, 2019 at 5:39 vote accept Pat
Jan 18, 2019 at 16:11 comment added firefly-orange my bad, try: sDist = p.geometry().distance( s.geometry() )
Jan 18, 2019 at 13:06 comment added Pat QGIS returns this error to me, File "<string>", line 50, in <module> TypeError: QgsGeometry.distance(QgsGeometry): argument 1 has unexpected type 'QgsPoint'. I am having troubles understanding this error. In the geometry section it checks that their is a point feature in the source file, in the sDist = p.geometry()... measures the distance between features. Am i missing something with this code?
Jan 18, 2019 at 10:31 comment added firefly-orange Also - your Chainage_attribute_to_match object in instance of QGSField. You need to pass a string to c.attribute(), so try c.attribute( Chainage_attribute_to_match.name() )
Jan 18, 2019 at 10:27 history answered firefly-orange CC BY-SA 4.0