1644 if (d <= max_seg_length)
1659 mid.
x = (p1->
x + p2->
x) / 2.0;
1660 mid.
y = (p1->
y + p2->
y) / 2.0;
1661 mid.
z = (p1->
z + p2->
z) / 2.0;
1669 midv.
z = (v1->
z + v2->
z) / 2.0;
1670 midv.
m = (v1->
m + v2->
m) / 2.0;
int ptarray_append_point(POINTARRAY *pa, const POINT4D *pt, int allow_duplicates)
Append a point to the end of an existing POINTARRAY If allow_duplicate is LW_FALSE,...
void normalize(POINT3D *p)
Normalize to a unit vector.
void cart2geog(const POINT3D *p, GEOGRAPHIC_POINT *g)
Convert cartesian coordinates on unit sphere to spherical coordinates.
static int ptarray_segmentize_sphere_edge_recursive(const POINT3D *p1, const POINT3D *p2, const POINT4D *v1, const POINT4D *v2, double d, double max_seg_length, POINTARRAY *pa)
Point in spherical coordinates on the world.