22 QString QgsStDbscanClusteringAlgorithm::name()
const
24 return QStringLiteral(
"stdbscanclustering" );
27 QString QgsStDbscanClusteringAlgorithm::displayName()
const
29 return QObject::tr(
"ST-DBSCAN clustering" );
32 QString QgsStDbscanClusteringAlgorithm::shortDescription()
const
34 return QObject::tr(
"Clusters spatiotemporal point features using a time and density based scan algorithm." );
37 QStringList QgsStDbscanClusteringAlgorithm::tags()
const
39 return QObject::tr(
"clustering,clusters,density,based,points,temporal,time,interval,duration,distance" ).split(
',' );
42 QString QgsStDbscanClusteringAlgorithm::group()
const
44 return QObject::tr(
"Vector analysis" );
47 QString QgsStDbscanClusteringAlgorithm::groupId()
const
49 return QStringLiteral(
"vectoranalysis" );
52 void QgsStDbscanClusteringAlgorithm::initAlgorithm(
const QVariantMap & )
57 QObject::tr(
"Date/time field" ), QVariant(),
63 QObject::tr(
"Maximum distance between clustered points" ), 1, QStringLiteral(
"INPUT" ),
false, 0 ) );
64 auto durationParameter = std::make_unique<QgsProcessingParameterDuration>( QStringLiteral(
"EPS2" ),
65 QObject::tr(
"Maximum time duration between clustered points" ), 0,
false, 0 );
67 addParameter( durationParameter.release() );
69 auto dbscanStarParam = std::make_unique<QgsProcessingParameterBoolean>( QStringLiteral(
"DBSCAN*" ),
70 QObject::tr(
"Treat border points as noise (DBSCAN*)" ),
false,
true );
72 addParameter( dbscanStarParam.release() );
74 auto fieldNameParam = std::make_unique<QgsProcessingParameterString>( QStringLiteral(
"FIELD_NAME" ),
75 QObject::tr(
"Cluster field name" ), QStringLiteral(
"CLUSTER_ID" ) );
77 addParameter( fieldNameParam.release() );
78 auto sizeFieldNameParam = std::make_unique<QgsProcessingParameterString>( QStringLiteral(
"SIZE_FIELD_NAME" ),
79 QObject::tr(
"Cluster size field name" ), QStringLiteral(
"CLUSTER_SIZE" ) );
81 addParameter( sizeFieldNameParam.release() );
88 QString QgsStDbscanClusteringAlgorithm::shortHelpString()
const
90 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"
91 "For more details, please see the following papers:\n"
92 "* 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"
93 "* Birant, Derya, and Alp Kut. \"ST-DBSCAN: An algorithm for clustering spatial–temporal data.\" Data & Knowledge Engineering 60.1 (2007): 208-221.\n"
94 "* Peca, I., Fuchs, G., Vrotsou, K., Andrienko, N. V., & Andrienko, G. L. (2012). Scalable Cluster Analysis of Spatial Events. In EuroVA@ EuroVis." );
97 QgsStDbscanClusteringAlgorithm *QgsStDbscanClusteringAlgorithm::createInstance()
const
99 return new QgsStDbscanClusteringAlgorithm();