Inside my .shp there are two simple layer:
- "Points_Example" (Type: Point, EPSG:25832)
- "Lines_Example" (Type: Line, EPSG:25832)
Some of the points are located exactly on the line and I'm trying to filter out these points via Python, but for some reason QGIS is always saying there are no points on my line!
layerLines = QgsProject.instance().mapLayersByName('Lines_Example') layerLine = layerLines layerPoints = QgsProject.instance().mapLayersByName('Points_Example') layerPoint = layerPoints list =  for line in layerLine.getFeatures(): geom = item.geometry() for point in layerPoint.getFeatures(): if point.geometry().touches(geom): list.append(point['id'])
I've also tried some other methods from "QgsGeometry", but nothing seems to work! How can I solve this?