Definition at line 3244 of file lwgeodetic.c.
3247 double za = 0.0, zb = 0.0;
3251 double length = 0.0;
3252 double seglength = 0.0;
3255 if ( ! pa || pa->
npoints < 2 )
3268 for ( i = 1; i < pa->
npoints; i++ )
3285 seglength = sqrt( (zb-za)*(zb-za) + seglength*seglength );
3288 length += seglength;
#define FLAGS_GET_Z(flags)
int getPoint4d_p(const POINTARRAY *pa, uint32_t n, POINT4D *point)
void geographic_point_init(double lon, double lat, GEOGRAPHIC_POINT *g)
Initialize a geographic point.
double sphere_distance(const GEOGRAPHIC_POINT *s, const GEOGRAPHIC_POINT *e)
Given two points on a unit sphere, calculate their distance apart in radians.
double spheroid_distance(const GEOGRAPHIC_POINT *a, const GEOGRAPHIC_POINT *b, const SPHEROID *spheroid)
Computes the shortest distance along the surface of the spheroid between two points,...
Point in spherical coordinates on the world.
References POINTARRAY::flags, FLAGS_GET_Z, geographic_point_init(), getPoint4d_p(), LW_FALSE, POINTARRAY::npoints, s, sphere_distance(), spheroid_distance(), POINT4D::x, POINT4D::y, and POINT4D::z.
Referenced by lwgeom_length_spheroid().