QGIS API Documentation
4.3.0-Master (7c7bd4d7018)
Loading...
Searching...
No Matches
src
analysis
processing
qgsdistanceutils.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsdistanceutils.cpp
3
---------------------
4
begin : June 2026
5
copyright : (C) 2026 by Alexander Bruy
6
email : alexander dot bruy at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSDISTANCEUTILS_H
19
#define QGSDISTANCEUTILS_H
20
21
#include <utility>
22
#include <vector>
23
24
#include "qgis_analysis.h"
25
#include "
qgis_sip.h
"
26
#include "
qgsfeatureid.h
"
27
#include "
qgspointxy.h
"
28
29
#define SIP_NO_FILE
30
31
class
QgsDistanceArea
;
32
class
QgsProcessingFeedback
;
33
35
36
namespace
QgsDistanceUtils
37
{
38
struct
ANALYSIS_EXPORT NeighborResult
39
{
40
QgsFeatureId
featureId;
41
double
distance;
42
QgsPointXY
point;
43
};
44
57
ANALYSIS_EXPORT std::vector<QgsDistanceUtils::NeighborResult> nearestNeighbors(
58
const
QgsPointXY &sourcePoint,
const
std::vector<std::pair<QgsFeatureId, QgsPointXY>> &targetPoints,
const
QgsDistanceArea &da,
long
long
k, QgsProcessingFeedback *feedback =
nullptr
59
);
60
}
//namespace QgsDistanceUtils
61
63
64
#endif
// QGSDISTANCEUTILS_H
QgsDistanceArea
A general purpose distance and area calculator, capable of performing ellipsoid based calculations.
Definition
qgsdistancearea.h:54
QgsPointXY
Represents a 2D point.
Definition
qgspointxy.h:62
QgsProcessingFeedback
Base class for providing feedback from a processing algorithm.
Definition
qgsprocessingfeedback.h:40
qgis_sip.h
qgsfeatureid.h
QgsFeatureId
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
Definition
qgsfeatureid.h:32
qgspointxy.h
Generated on
for QGIS API Documentation by
1.15.0