Re: [Qgis-developer] calculate distance from two points along line in pyqgis

2015-01-14 Thread gene
Therefore there is a quicker solution iterating through the segments of the line until a segment contains the point The Spatial predicate is *point.within(line)* but as there are floating point precision errors when finding a point on a line, I use the distance with an appropriate threshold. def

[Qgis-developer] Translation - processing plugin

2015-01-14 Thread Arnaud Morvan
Hello, I want to translate processing plugin in french. But I'm not sure about the exact translation process : - add self.tr calls in code - run push_ts.sh script to update english translation file and push it to transifex - translate strings on transifex website - optionnaly run pull_ts.sh t

Re: [Qgis-developer] calculate distance from two points along line in pyqgis

2015-01-14 Thread G. Allegri
Yes gene. Plus, this script considers a point not intersecting the line. 2015-01-14 10:49 GMT+01:00 gene : > = sum of segments length before the one where the intersecting point lies + > the length between the first point of this segment and the intersection > point > > > > -- > View this message

Re: [Qgis-developer] calculate distance from two points along line in pyqgis

2015-01-14 Thread gene
= sum of segments length before the one where the intersecting point lies + the length between the first point of this segment and the intersection point -- View this message in context: http://osgeo-org.1560.x6.nabble.com/calculate-distance-from-two-points-along-line-in-pyqgis-tp5181313p518141

Re: [Qgis-developer] calculate distance from two points along line in pyqgis

2015-01-14 Thread G. Allegri
https://gist.github.com/giohappy/f2abde1549aa2775b5aa 2015-01-14 10:40 GMT+01:00 gene : > I don't have the code posted by Giovanni but this is very easy to do with > Shapely (a Python wrapper of > GEOS). > > With PyQGIS, I do it in this way: > > 1) by

Re: [Qgis-developer] calculate distance from two points along line in pyqgis

2015-01-14 Thread gene
I don't have the code posted by Giovanni but this is very easy to do with Shapely (a Python wrapper of GEOS). With PyQGIS, I do it in this way: 1) by definition a polyline is composed of straight segments between points (nodes) 2) after computing th

Re: [Qgis-developer] cannot compile qgis on opensuse 13.2 (64 bit) **newbie** **Fixed

2015-01-14 Thread Otto Dassau
Am Wed, 14 Jan 2015 20:19:47 +1100 schrieb h : > On Sun, 11 Jan 2015 17:34:57 +1100 > h wrote: > > > Hi, > > I have previously done compiles of qgis by following instructions > > similar to > > https://raw.githubusercontent.com/qgis/QGIS/master/INSTALL, with only > > minor trouble. I now have

Re: [Qgis-developer] cannot compile qgis on opensuse 13.2 (64 bit) **newbie** **Fixed

2015-01-14 Thread h
On Sun, 11 Jan 2015 17:34:57 +1100 h wrote: > Hi, > I have previously done compiles of qgis by following instructions > similar to > https://raw.githubusercontent.com/qgis/QGIS/master/INSTALL, with only > minor trouble. I now have a new PC and new version opensuse - and I > cannot work out why it

Re: [Qgis-developer] calculate distance from two points along line in pyqgis

2015-01-14 Thread Ing. Pierluigi De Rosa
Dear Gene, Maybe my have not been well explained but I don't need the straight cartesian distance but the distance following the line (as a path). I think the code posted by Giovanni should be fine for my case. I will test it right now. Thanks Pierluigi Il giorno mer, 14/01/2015 alle 00.05 -080

Re: [Qgis-developer] calculate distance from two points along line in pyqgis

2015-01-14 Thread gene
It is a pure problem of analytical geometry or vector calculus (look at PyQGIS: geometry, vectors, vector algebra or direction cosines...(in French )) Is the line is straigh