28using namespace Qt::StringLiterals;
32QString QgsSplitGeometryAtAntimeridianAlgorithm::name()
const
34 return u
"antimeridiansplit"_s;
37QString QgsSplitGeometryAtAntimeridianAlgorithm::displayName()
const
39 return QObject::tr(
"Geodesic line split at antimeridian" );
42QStringList QgsSplitGeometryAtAntimeridianAlgorithm::tags()
const
44 return QObject::tr(
"break,cut,dateline,180,-180,longitude,geographic,ellipsoid" ).split(
',' );
47QString QgsSplitGeometryAtAntimeridianAlgorithm::group()
const
49 return QObject::tr(
"Vector geometry" );
52QString QgsSplitGeometryAtAntimeridianAlgorithm::groupId()
const
54 return u
"vectorgeometry"_s;
57QString QgsSplitGeometryAtAntimeridianAlgorithm::shortDescription()
const
59 return QObject::tr(
"Splits lines into multiple geodesic segments when the line crosses the antimeridian (±180 degrees longitude)." );
62QString QgsSplitGeometryAtAntimeridianAlgorithm::shortHelpString()
const
64 return QObject::tr(
"This algorithm splits a line into multiple geodesic segments, whenever the line crosses the antimeridian (±180 degrees longitude).\n\n"
65 "Splitting at the antimeridian helps the visual display of the lines in some projections. The returned "
66 "geometry will always be a multi-part geometry.\n\n"
67 "Whenever line segments in the input geometry cross the antimeridian, they will be "
68 "split into two segments, with the latitude of the breakpoint being determined using a geodesic "
69 "line connecting the points either side of this segment. The current project ellipsoid setting will "
70 "be used when calculating this breakpoint.\n\n"
71 "If the input geometry contains M or Z values, these will be linearly interpolated for the new vertices "
72 "created at the antimeridian." );
80QList<int> QgsSplitGeometryAtAntimeridianAlgorithm::inputLayerTypes()
const
90QgsSplitGeometryAtAntimeridianAlgorithm *QgsSplitGeometryAtAntimeridianAlgorithm::createInstance()
const
92 return new QgsSplitGeometryAtAntimeridianAlgorithm();
95QString QgsSplitGeometryAtAntimeridianAlgorithm::outputName()
const
97 return QObject::tr(
"Split" );
107 mDa.setSourceCrs( inputCrs, mTransformContext );
ProcessingSourceType
Processing data source types.
@ VectorLine
Vector line layers.
@ RespectsEllipsoid
Algorithm respects the context's ellipsoid settings, and uses ellipsoidal based measurements.
QFlags< ProcessingAlgorithmDocumentationFlag > ProcessingAlgorithmDocumentationFlags
Flags describing algorithm behavior for documentation purposes.
WkbType
The WKB type describes the number of dimensions a geometry has.
Represents a coordinate reference system (CRS).
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
bool hasGeometry() const
Returns true if the feature has an associated geometry.
void setGeometry(const QgsGeometry &geometry)
Set the feature's geometry.
Contains information about the context in which a processing algorithm is executed.
QgsCoordinateTransformContext transformContext() const
Returns the coordinate transform context.
QString ellipsoid() const
Returns the ellipsoid to use for distance and area calculations.
Base class for providing feedback from a processing algorithm.
static Qgis::WkbType multiType(Qgis::WkbType type)
Returns the multi type for a WKB type.
QList< QgsFeature > QgsFeatureList