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)
Macros for manipulating the 'flags' byte.
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.