On 29 November 2017 at 02:22, Germán Carrillo <carrillo.ger...@gmail.com> wrote:
>
> Hi devs,
>
>
> do you know why this polyline
>
> >>> my_line = QgsGeometry().fromWkt('0 0, 963461.42999999970197678 
> >>> 1077875.79199999943375587, 1 1')
>
> and this point
>
> >>> my_point = QgsGeometry().fromWkt("Point (963461.430 1077875.792)")
>
> don't intersect?
>
> >>> my_line.intersects(my_point) # returns False
>

Because we use the GEOS library to test intersects, and it performs an
exact intersection test. So 963461.42999999970197678
1077875.79199999943375587 is not the same as 963461.430 1077875.792.

This is the same behaviour in 2.x, and all other GEOS based projects
(e.g. PostGIS gives the same result).

Nyall
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to