Feature request #17585

Allow tolerance in intersects tests

Added by gcarrillo - over 6 years ago. Updated over 6 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Geometry
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:25482

Description

>>> my_line = QgsGeometry().fromWkt('0 0, 963461.42999999970197678 1077875.79199999943375587, 1 1')
>>> my_point = QgsGeometry().fromWkt("Point (963461.430 1077875.792)")
>>> my_line.intersects(my_point)
False

Any way to set a tolerance or something so that such intersection is found? The line was created digitizing it in QGIS using snapping (vertex mode, 9 pixels of tolerance).

History

#1 Updated by Nyall Dawson over 6 years ago

  • Subject changed from Polyline.intersects(Point) doesn't work in QGIS master to Allow tolerance in intersects tests
  • Tracker changed from Bug report to Feature request

Same behavior in 2.x. I'm changing this from a bug to a feature request, because the current behaviour is correct - those two geometries don't intersect.

#2 Updated by gcarrillo - over 6 years ago

  • Status changed from Open to Closed

It would be nice to have a tolerance parameter so that this very little discrepancies can also be found, but I guess one could snap one geometry to the other (with such little distance as tolerance) and then run intersects.

#3 Updated by Giovanni Manghi over 6 years ago

  • Status changed from Closed to Open

Also available in: Atom PDF