PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ calc_weighted_distances_3d()

static double calc_weighted_distances_3d ( const POINT3D curr,
const POINT4D points,
uint32_t  npoints,
double *  distances 
)
static

Definition at line 33 of file lwgeom_median.c.

34{
35 uint32_t i;
36 double weight = 0.0;
37 for (i = 0; i < npoints; i++)
38 {
39 double dist = distance3d_pt_pt(curr, (POINT3D*)&points[i]);
40 distances[i] = dist / points[i].m;
41 weight += dist * points[i].m;
42 }
43
44 return weight;
45}
double distance3d_pt_pt(const POINT3D *p1, const POINT3D *p2)
double m
Definition liblwgeom.h:414

References distance3d_pt_pt(), and POINT4D::m.

Referenced by iterate_4d().

Here is the call graph for this function:
Here is the caller graph for this function: