Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
do the interpolation on the geometry instead using interpolatedPoint …
…method
  • Loading branch information
lbartoletti authored and nyalldawson committed Oct 26, 2019
1 parent 58a3540 commit 8e9d8e7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/gui/qgsmaptoolcapture.cpp
Expand Up @@ -398,7 +398,12 @@ int QgsMapToolCapture::fetchLayerPoint( const QgsPointLocator::Match &match, Qgs

if ( match.hasEdge() )
{
layerPoint = match.interpolatedPoint();
QgsVertexId vId2;
if ( !f.geometry().vertexIdFromVertexNr( match.vertexIndex() + 1, vId2 ) )
return 2;
QgsLineString line( f.geometry().constGet()->vertexAt( vId ), f.geometry().constGet()->vertexAt( vId2 ) );

layerPoint = QgsGeometryUtils::closestPoint( line, QgsPoint( match.point() ) );
}
else
{
Expand Down

0 comments on commit 8e9d8e7

Please sign in to comment.