PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ lwmpoint_construct()

LWMPOINT * lwmpoint_construct ( int32_t  srid,
const POINTARRAY pa 
)
extern

Definition at line 52 of file lwmpoint.c.

53{
54 uint32_t i;
55 int hasz = ptarray_has_z(pa);
56 int hasm = ptarray_has_m(pa);
58
59 for ( i = 0; i < pa->npoints; i++ )
60 {
61 LWPOINT *lwp;
62 POINT4D p;
63 getPoint4d_p(pa, i, &p);
64 lwp = lwpoint_make(srid, hasz, hasm, &p);
65 lwmpoint_add_lwpoint(ret, lwp);
66 }
67
68 return ret;
69}
#define MULTIPOINTTYPE
Definition liblwgeom.h:105
int getPoint4d_p(const POINTARRAY *pa, uint32_t n, POINT4D *point)
Definition lwgeom_api.c:125
LWPOINT * lwpoint_make(int32_t srid, int hasz, int hasm, const POINT4D *p)
Definition lwpoint.c:206
LWCOLLECTION * lwcollection_construct_empty(uint8_t type, int32_t srid, char hasz, char hasm)
int ptarray_has_z(const POINTARRAY *pa)
Definition ptarray.c:37
int ptarray_has_m(const POINTARRAY *pa)
Definition ptarray.c:44
LWMPOINT * lwmpoint_add_lwpoint(LWMPOINT *mobj, const LWPOINT *obj)
Definition lwmpoint.c:45
uint32_t npoints
Definition liblwgeom.h:427

References getPoint4d_p(), lwcollection_construct_empty(), lwmpoint_add_lwpoint(), lwpoint_make(), MULTIPOINTTYPE, POINTARRAY::npoints, ptarray_has_m(), and ptarray_has_z().

Referenced by geography_interpolate_points(), LWGEOM_line_interpolate_point(), and lwline_locate_along().

Here is the call graph for this function:
Here is the caller graph for this function: