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

◆ lwline_force_dims()

LWLINE * lwline_force_dims ( const LWLINE line,
int  hasz,
int  hasm 
)

Definition at line 483 of file lwline.c.

484{
485 POINTARRAY *pdims = NULL;
486 LWLINE *lineout;
487
488 /* Return 2D empty */
489 if( lwline_is_empty(line) )
490 {
491 lineout = lwline_construct_empty(line->srid, hasz, hasm);
492 }
493 else
494 {
495 pdims = ptarray_force_dims(line->points, hasz, hasm);
496 lineout = lwline_construct(line->srid, NULL, pdims);
497 }
498 lineout->type = line->type;
499 return lineout;
500}
int lwline_is_empty(const LWLINE *line)
POINTARRAY * ptarray_force_dims(const POINTARRAY *pa, int hasz, int hasm)
Definition ptarray.c:1043
LWLINE * lwline_construct(int32_t srid, GBOX *bbox, POINTARRAY *points)
Definition lwline.c:42
LWLINE * lwline_construct_empty(int32_t srid, char hasz, char hasm)
Definition lwline.c:55
POINTARRAY * points
Definition liblwgeom.h:469
uint8_t type
Definition liblwgeom.h:472
int32_t srid
Definition liblwgeom.h:470

References lwline_construct(), lwline_construct_empty(), lwline_is_empty(), LWLINE::points, ptarray_force_dims(), LWLINE::srid, and LWLINE::type.

Referenced by lwgeom_force_dims().

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