22using namespace Qt::StringLiterals;
26QString QgsStDbscanClusteringAlgorithm::name()
const
28 return u
"stdbscanclustering"_s;
31QString QgsStDbscanClusteringAlgorithm::displayName()
const
33 return QObject::tr(
"ST-DBSCAN clustering" );
36QString QgsStDbscanClusteringAlgorithm::shortDescription()
const
38 return QObject::tr(
"Clusters spatiotemporal point features using a time and density based scan algorithm." );
41QStringList QgsStDbscanClusteringAlgorithm::tags()
const
43 return QObject::tr(
"clustering,clusters,density,based,points,temporal,time,interval,duration,distance" ).split(
',' );
46QString QgsStDbscanClusteringAlgorithm::group()
const
48 return QObject::tr(
"Vector analysis" );
51QString QgsStDbscanClusteringAlgorithm::groupId()
const
53 return u
"vectoranalysis"_s;
56void QgsStDbscanClusteringAlgorithm::initAlgorithm(
const QVariantMap & )
62 addParameter(
new QgsProcessingParameterDistance( u
"EPS"_s, QObject::tr(
"Maximum distance between clustered points" ), 1, u
"INPUT"_s,
false, 0 ) );
63 auto durationParameter = std::make_unique<QgsProcessingParameterDuration>( u
"EPS2"_s, QObject::tr(
"Maximum time duration between clustered points" ), 0,
false, 0 );
65 addParameter( durationParameter.release() );
67 auto dbscanStarParam = std::make_unique<QgsProcessingParameterBoolean>( u
"DBSCAN*"_s, QObject::tr(
"Treat border points as noise (DBSCAN*)" ),
false,
true );
69 addParameter( dbscanStarParam.release() );
71 auto fieldNameParam = std::make_unique<QgsProcessingParameterString>( u
"FIELD_NAME"_s, QObject::tr(
"Cluster field name" ), u
"CLUSTER_ID"_s );
73 addParameter( fieldNameParam.release() );
74 auto sizeFieldNameParam = std::make_unique<QgsProcessingParameterString>( u
"SIZE_FIELD_NAME"_s, QObject::tr(
"Cluster size field name" ), u
"CLUSTER_SIZE"_s );
76 addParameter( sizeFieldNameParam.release() );
83QString QgsStDbscanClusteringAlgorithm::shortHelpString()
const
85 return QObject::tr(
"Clusters point features based on a 2D implementation of spatiotemporal density-based clustering of applications with noise (ST-DBSCAN) algorithm.\n\n"
86 "For more details, please see the following papers:\n"
87 "* Ester, M., H. P. Kriegel, J. Sander, and X. Xu, \"A Density-Based Algorithm for Discovering Clusters in Large Spatial Databases with Noise\". In: Proceedings of the 2nd International Conference on Knowledge Discovery and Data Mining, Portland, OR, AAAI Press, pp. 226-231. 1996\n"
88 "* Birant, Derya, and Alp Kut. \"ST-DBSCAN: An algorithm for clustering spatial–temporal data.\" Data & Knowledge Engineering 60.1 (2007): 208-221.\n"
89 "* Peca, I., Fuchs, G., Vrotsou, K., Andrienko, N. V., & Andrienko, G. L. (2012). Scalable Cluster Analysis of Spatial Events. In EuroVA@ EuroVis." );
92QgsStDbscanClusteringAlgorithm *QgsStDbscanClusteringAlgorithm::createInstance()
const
94 return new QgsStDbscanClusteringAlgorithm();
@ VectorPoint
Vector point layers.
@ DateTime
Accepts datetime fields.
@ Advanced
Parameter is an advanced parameter which should be hidden from users by default.
A numeric output for processing algorithms.
A double numeric parameter for distance values.
A feature sink output for processing algorithms.
An input feature source (such as vector layers) parameter for processing algorithms.
A vector layer or feature source field parameter for processing algorithms.
A numeric parameter for processing algorithms.