[QGIS-Developer] closestSegmentWithContext() with epsilon in Python

Matthias Kuhn matthias at opengis.ch
Fri Nov 24 04:16:49 PST 2017


Hi Radim,

I don't know why the epsilon is excluded from the python bindings, the
docs say nothing.
Adjusting it should be trivial, just edit qgsgeometry.h (the
prepare-commit script will do the heavy lifting)

Matthias

On 11/24/2017 12:58 PM, Radim Blazek wrote:
> Hi,
> 
> I found that closestSegmentWithContext() in Python is useless for
> geometries in geographic crs, because small squared distances are set
> to zero because of epsilon threshold. See for example:
> https://user-images.githubusercontent.com/29453443/32953189-c395d8a0-cbaf-11e7-8d71-b5869392f08b.PNG
> points are not assigned to lines correctly because square distances are wrong.
> 
> Would it be possible to add epsilon as keyword argument to
> closestSegmentWithContext() and possibly other methods taking epsilon
> in C++?
> 
> I am not sip/python expert, no idea how to do that.
> 
> Thanks
> Radim
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> 


More information about the QGIS-Developer mailing list