Hi Pierluigi, I don't know of such a function available from Python. I've translated a function from GEOS (C++) to Python some time ago. If you wish I can share it.
giovanni 2015-01-13 18:16 GMT+01:00 Ing. Pierluigi De Rosa < [email protected]>: > Hi all, > > I have a line geometry (ALine) and a point(Apoint) belonging to the > ALine. > Apoint have been evaluated from a second line geometry Bline that cross > the Aline using the QgsGeometry intersection function as: > Apoint =Bline.intersection(Aline) > > I need to calculate distance along Aline from the starting point of > Aline up to Apoint. > > In a certain way this problem could be seen as the opposite of function > interpolate of QgsGeometry > point = geom.interpolate(currentdistance) > where it is known the distance from the beginning and it provide the > point at specific distance. > In my case I have the point but I need the distance. > > Thanks > Pierluigi > -- > > > ________________________________________________________________________ > Ing. Pierluigi De Rosa (PhD) > Studio Associato GFOSSERVICES > > > _______________________________________________ > Qgis-developer mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/qgis-developer > -- Giovanni Allegri http://about.me/giovanniallegri Twitter: https://twitter.com/_giohappy_ blog: http://blog.spaziogis.it GEO+ geomatica in Italia http://bit.ly/GEOplus
_______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
