Definition at line 303 of file lwgeom_functions_lrs.c.
References POINT4D::m, POINT4D::x, POINT4D::y, and POINT4D::z.
Referenced by ptarray_locate_between_m().
305 double dM0, dM1, dX, dY, dZ;
310 POSTGIS_DEBUGF(3,
"m0: %g m1: %g", m0, m1);
313 if ( p1->
m == p2->
m )
316 if ( p1->
m < m0 || p1->
m > m1 )
338 if ( p2->
m < m0 || p1->
m > m1 )
345 if ( p1->
m >= m0 && p2->
m <= m1 )
358 dM0=(m0-p1->
m)/(p2->
m-p1->
m);
359 dM1=(m1-p2->
m)/(p2->
m-p1->
m);
364 POSTGIS_DEBUGF(3,
"dM0:%g dM1:%g", dM0, dM1);
365 POSTGIS_DEBUGF(3,
"dX:%g dY:%g dZ:%g", dX, dY, dZ);
366 POSTGIS_DEBUGF(3,
"swapped: %d", swapped);
378 if (m0 == m1 && p2->
m <= m1)
380 memcpy(p1, p2,
sizeof(
POINT4D));
382 POSTGIS_DEBUG(3,
"Projected p1 on range (as copy of p2)");
392 POSTGIS_DEBUG(3,
"Projected p1 on range");
395 if ( swapped ) ret |= 0x0100;
409 if (m0 == m1 && p1->
m >= m0)
411 memcpy(p2, p1,
sizeof(
POINT4D));
413 POSTGIS_DEBUG(3,
"Projected p2 on range (as copy of p1)");
423 POSTGIS_DEBUG(3,
"Projected p2 on range");
426 if ( swapped ) ret |= 0x0010;