25using namespace Qt::StringLiterals;
29QString QgsTransectAlgorithm::name()
const
34QString QgsTransectAlgorithm::displayName()
const
36 return QObject::tr(
"Transect" );
39QString QgsTransectAlgorithm::shortHelpString()
const
41 return QObject::tr(
"This algorithm creates transects on vertices for (multi)linestrings.\n" )
42 + QObject::tr(
"A transect is a line oriented from an angle (by default perpendicular) to the input polylines (at vertices)." )
44 + QObject::tr(
"Field(s) from feature(s) are returned in the transect with these new fields:\n" )
45 + QObject::tr(
"- TR_FID: ID of the original feature\n" )
46 + QObject::tr(
"- TR_ID: ID of the transect. Each transect have an unique ID\n" )
47 + QObject::tr(
"- TR_SEGMENT: ID of the segment of the linestring\n" )
48 + QObject::tr(
"- TR_ANGLE: Angle in degrees from the original line at the vertex\n" )
49 + QObject::tr(
"- TR_LENGTH: Total length of the transect returned\n" )
50 + QObject::tr(
"- TR_ORIENT: Side of the transect (only on the left or right of the line, or both side)\n" );
53QgsTransectAlgorithm *QgsTransectAlgorithm::createInstance()
const
55 return new QgsTransectAlgorithm();
58void QgsTransectAlgorithm::addAlgorithmParams()
71 std::vector<QgsPoint> samplingPoints;
74 samplingPoints.push_back( *it );
76 return samplingPoints;
79double QgsTransectAlgorithm::calculateAzimuth(
const QgsLineString &line,
const QgsPoint &,
int pointIndex )
vertex_iterator vertices_end() const
Returns STL-style iterator pointing to the imaginary vertex after the last vertex of the geometry.
vertex_iterator vertices_begin() const
Returns STL-style iterator pointing to the first vertex of the geometry.
Line string geometry type, with support for z-dimension and m-values.
double vertexAngle(QgsVertexId vertex) const override
Returns approximate angle at a vertex.
Point geometry type, with support for z-dimension and m-values.
Contains information about the context in which a processing algorithm is executed.
Base class for providing feedback from a processing algorithm.
Utility class for identifying a unique vertex within a geometry.