553{
555 int i;
557 int ngeoms;
558 int outtype;
559 int typeflag=0;
560 const int pointflag=0x01;
561 const int lineflag=0x10;
563
564 POSTGIS_DEBUGF(2, "lwline_locate_between called for lwline %p", lwline_in);
565
566 POSTGIS_DEBUGF(3, " ptarray_locate... returned %d pointarrays",
568
570 {
571 return NULL;
572 }
573
575
577 for (i=0; i<ngeoms; i++)
578 {
581
583
584
586 {
588 geoms[i]=(
LWGEOM *)lwpoint;
589 typeflag|=pointflag;
590 }
591
592
594 {
596 geoms[i]=(
LWGEOM *)lwline;
597 typeflag|=lineflag;
598 }
599
600
601 else
602 {
603 lwpgerror("ptarray_locate_between_m returned a POINARRAY set containing POINTARRAY with 0 points");
604 }
605
606 }
607
608 if ( ngeoms == 1 )
609 {
610 return geoms[0];
611 }
612 else
613 {
614
618
620 lwline_in->
srid, NULL, ngeoms, geoms);
621 }
622}
LWCOLLECTION * lwcollection_construct(uint8_t type, int32_t srid, GBOX *bbox, uint32_t ngeoms, LWGEOM **geoms)
LWPOINT * lwpoint_construct(int32_t srid, GBOX *bbox, POINTARRAY *point)
void * lwalloc(size_t size)
LWLINE * lwline_construct(int32_t srid, GBOX *bbox, POINTARRAY *points)
static POINTARRAYSET ptarray_locate_between_m(POINTARRAY *ipa, double m0, double m1)