22using namespace Qt::StringLiterals;
26QString QgsAssignProjectionAlgorithm::name()
const
28 return u
"assignprojection"_s;
31QString QgsAssignProjectionAlgorithm::displayName()
const
33 return QObject::tr(
"Assign projection" );
36QStringList QgsAssignProjectionAlgorithm::tags()
const
38 return QObject::tr(
"assign,set,transform,reproject,crs,srs,warp" ).split(
',' );
41QString QgsAssignProjectionAlgorithm::group()
const
43 return QObject::tr(
"Vector general" );
46QString QgsAssignProjectionAlgorithm::groupId()
const
48 return u
"vectorgeneral"_s;
51QString QgsAssignProjectionAlgorithm::outputName()
const
53 return QObject::tr(
"Assigned CRS" );
56QString QgsAssignProjectionAlgorithm::shortHelpString()
const
58 return QObject::tr(
"This algorithm assigns a new projection to a vector layer. It creates a new layer with the exact same features "
59 "and geometries as the input one, but assigned to a new CRS. E.g. the geometries are not reprojected, they are just assigned "
60 "to a different CRS. This algorithm can be used to repair layers which have been assigned an incorrect projection.\n\n"
61 "Attributes are not modified by this algorithm." );
64QString QgsAssignProjectionAlgorithm::shortDescription()
const
66 return QObject::tr(
"Assigns a new projection to a copy of a vector layer, with the exact same features and geometries." );
69QgsAssignProjectionAlgorithm *QgsAssignProjectionAlgorithm::createInstance()
const
71 return new QgsAssignProjectionAlgorithm();
74bool QgsAssignProjectionAlgorithm::supportInPlaceEdit(
const QgsMapLayer *layer )
const
80void QgsAssignProjectionAlgorithm::initParameters(
const QVariantMap & )
92 mDestCrs = parameterAsCrs( parameters, u
"CRS"_s, context );
@ SkipGeometryValidityChecks
Invalid geometry checks should always be skipped. This flag can be useful for algorithms which always...
QFlags< ProcessingFeatureSourceFlag > ProcessingFeatureSourceFlags
Flags which control how QgsProcessingFeatureSource fetches features.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Base class for all map layer types.
Contains information about the context in which a processing algorithm is executed.
Base class for providing feedback from a processing algorithm.
A coordinate reference system parameter for processing algorithms.
QList< QgsFeature > QgsFeatureList