start location (distance from start / total distance) end location (distance from start / total distance)
1069 double length, slength, tlength;
1082 LWDEBUGF(3,
"Total length: %g", length);
1090 LWDEBUGF(3,
"From/To: %g/%g", from, to);
1095 nsegs = ipa->npoints - 1;
1096 for ( i = 0; i < nsegs; i++ )
1103 LWDEBUGF(3 ,
"Segment %d: (%g,%g,%g,%g)-(%g,%g,%g,%g)",
1104 i, p1.
x, p1.
y, p1.
z, p1.
m, p2.
x, p2.
y, p2.
z, p2.
m);
1118 if ( fabs ( from - ( tlength + slength ) ) <= tolerance )
1121 LWDEBUG(3,
" Second point is our start");
1131 else if ( fabs(from - tlength) <= tolerance )
1134 LWDEBUG(3,
" First point is our start");
1152 else if ( from > tlength + slength )
goto END;
1157 LWDEBUG(3,
" Seg contains first point");
1163 dseg = (from - tlength) / slength;
1185 if ( fabs(to - ( tlength + slength ) ) <= tolerance )
1188 LWDEBUG(3,
" Second point is our end");
1198 else if ( fabs(to - tlength) <= tolerance )
1201 LWDEBUG(3,
" First point is our end");
1212 else if ( to > tlength + slength )
1222 else if ( to < tlength + slength )
1225 LWDEBUG(3,
" Seg contains our end");
1227 dseg = (to - tlength) / slength;
1245 memcpy(&p1, &p2,
sizeof(
POINT4D));
#define LWDEBUG(level, msg)
int ptarray_append_point(POINTARRAY *pa, const POINT4D *pt, int repeated_points)
Append a point to the end of an existing POINTARRAY If allow_duplicate is LW_FALSE, then a duplicate point will not be added.
double distance2d_pt_pt(const POINT2D *p1, const POINT2D *p2)
The old function nessecary for ptarray_segmentize2d in ptarray.c.
void interpolate_point4d(POINT4D *A, POINT4D *B, POINT4D *I, double F)
Find interpolation point I between point A and point B so that the len(AI) == len(AB)*F and I falls o...
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
double ptarray_length_2d(const POINTARRAY *pts)
Find the 2d length of the given POINTARRAY (even if it's 3d)
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
#define FLAGS_GET_M(flags)
#define LWDEBUGF(level, msg,...)
int getPoint4d_p(const POINTARRAY *pa, int n, POINT4D *point)