Definition at line 436 of file lwgeom_functions_lrs.c.
References clip_seg_by_m_range(), POINTARRAY::flags, FLAGS_GET_M, FLAGS_GET_Z, getPoint4d_p(), LW_FALSE, LW_TRUE, lwalloc(), POINT4D::m, POINTARRAY::npoints, POINTARRAYSET::nptarrays, ptarray_append_point(), ptarray_construct_empty(), POINTARRAYSET::ptarrays, POINT4D::x, POINT4D::y, and POINT4D::z.
Referenced by lwline_locate_between_m().
453 POSTGIS_DEBUGF(2,
"ptarray_locate...: called for pointarray %p, m0:%g, m1:%g",
465 POSTGIS_DEBUGF(3,
" segment %d-%d [ %g %g %g %g - %g %g %g %g ]",
467 p1.
x, p1.
y, p1.
z, p1.
m,
468 p2.
x, p2.
y, p2.
z, p2.
m);
473 if (! clipval )
continue;
475 POSTGIS_DEBUGF(3,
" clipped to: [ %g %g %g %g - %g %g %g %g ] clipval: %d", p1.
x, p1.
y, p1.
z, p1.
m,
476 p2.
x, p2.
y, p2.
z, p2.
m, clipval);
482 POSTGIS_DEBUGF(3,
" 1 creating new POINTARRAY with first point %g,%g,%g,%g", p1.
x, p1.
y, p1.
z, p1.
m);
495 if ( clipval & 0x0100 || i == ipa->
npoints-1 )
497 POSTGIS_DEBUGF(3,
" closing pointarray %p with %d points", dpa, dpa->
npoints);
508 if ( dpa != NULL ) lwpgerror(
"Something wrong with algorithm");
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
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, then a duplicate point will not be added.
#define LW_TRUE
Return types for functions with status returns.
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
#define FLAGS_GET_M(flags)
void * lwalloc(size_t size)
int getPoint4d_p(const POINTARRAY *pa, int n, POINT4D *point)
static int clip_seg_by_m_range(POINT4D *p1, POINT4D *p2, double m0, double m1)