Feature request #17585
Allow tolerance in intersects tests
|Pull Request or Patch supplied:||No||Resolution:|
|Easy fix?:||No||Copied to github as #:||25482|
>>> 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).
#1 Updated by Nyall Dawson about 3 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 - about 3 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.