mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Show curve point radius in infotool and fix bug in geometryutils
This commit is contained in:
parent
33977d16dd
commit
64e05ff69d
@ -83,6 +83,7 @@ QgsPointV2 QgsGeometryUtils::closestVertex( const QgsAbstractGeometryV2& geom, c
|
||||
id.part = vertexId.part;
|
||||
id.ring = vertexId.ring;
|
||||
id.vertex = vertexId.vertex;
|
||||
id.type = vertexId.type;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -310,6 +310,18 @@ void QgsMapToolIdentify::closestVertexAttributes( const QgsAbstractGeometryV2& g
|
||||
str = QLocale::system().toString( closestPoint.m(), 'g', 10 );
|
||||
derivedAttributes.insert( "Closest vertex M", str );
|
||||
}
|
||||
|
||||
if ( vId.type == QgsVertexId::CurveVertex )
|
||||
{
|
||||
double radius, centerX, centerY;
|
||||
QgsVertexId vIdBefore = vId;
|
||||
--vIdBefore.vertex;
|
||||
QgsVertexId vIdAfter = vId;
|
||||
++vIdAfter.vertex;
|
||||
QgsGeometryUtils::circleCenterRadius( geometry.vertexAt( vIdBefore ), geometry.vertexAt( vId ),
|
||||
geometry.vertexAt( vIdAfter ), radius, centerX, centerY );
|
||||
derivedAttributes.insert( "Closest vertex radius", QLocale::system().toString( radius ) );
|
||||
}
|
||||
}
|
||||
|
||||
QString QgsMapToolIdentify::formatCoordinate( const QgsPoint& canvasPoint ) const
|
||||
|
Loading…
x
Reference in New Issue
Block a user