Skip to content

Commit

Permalink
Fix beforeVertex - afterVertex mistake for linear referencing
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Apr 16, 2012
1 parent a4fa5b1 commit a4017a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/analysis/vector/qgsgeometryanalyzer.cpp
Expand Up @@ -1158,10 +1158,10 @@ QgsPoint QgsGeometryAnalyzer::createPointOffset( double x, double y, double dist
{
QgsPoint p( x, y );
QgsPoint minDistPoint;
int beforeVertexNr;
lineGeom->closestSegmentWithContext( p, minDistPoint, beforeVertexNr );
int afterVertexNr;
lineGeom->closestSegmentWithContext( p, minDistPoint, afterVertexNr );

int afterVertexNr = beforeVertexNr + 1;
int beforeVertexNr = afterVertexNr - 1;
QgsPoint beforeVertex = lineGeom->vertexAt( beforeVertexNr );
QgsPoint afterVertex = lineGeom->vertexAt( afterVertexNr );

Expand Down

0 comments on commit a4017a2

Please sign in to comment.