PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ lwline_force_dims()

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

Definition at line 492 of file lwline.c.

493 {
494  POINTARRAY *pdims = NULL;
495  LWLINE *lineout;
496 
497  /* Return 2D empty */
498  if( lwline_is_empty(line) )
499  {
500  lineout = lwline_construct_empty(line->srid, hasz, hasm);
501  }
502  else
503  {
504  pdims = ptarray_force_dims(line->points, hasz, hasm);
505  lineout = lwline_construct(line->srid, NULL, pdims);
506  }
507  lineout->type = line->type;
508  return lineout;
509 }
POINTARRAY * ptarray_force_dims(const POINTARRAY *pa, int hasz, int hasm)
Definition: ptarray.c:1037
int lwline_is_empty(const LWLINE *line)
Definition: lwline.c:511
LWLINE * lwline_construct_empty(int srid, char hasz, char hasm)
Definition: lwline.c:64
LWLINE * lwline_construct(int srid, GBOX *bbox, POINTARRAY *points)
Definition: lwline.c:42
uint8_t type
Definition: liblwgeom.h:421

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: