PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ lwline_grid()

LWLINE* lwline_grid ( const LWLINE line,
const gridspec grid 
)

Definition at line 595 of file lwline.c.

References lwline_construct(), POINTARRAY::npoints, LWLINE::points, ptarray_grid(), and LWLINE::srid.

Referenced by lwgeom_grid().

596 {
597  LWLINE *oline;
598  POINTARRAY *opa;
599 
600  opa = ptarray_grid(line->points, grid);
601 
602  /* Skip line3d with less then 2 points */
603  if ( opa->npoints < 2 ) return NULL;
604 
605  /* TODO: grid bounding box... */
606  oline = lwline_construct(line->srid, NULL, opa);
607 
608  return oline;
609 }
int npoints
Definition: liblwgeom.h:371
int32_t srid
Definition: liblwgeom.h:421
POINTARRAY * ptarray_grid(const POINTARRAY *pa, const gridspec *grid)
Definition: ptarray.c:1890
LWLINE * lwline_construct(int srid, GBOX *bbox, POINTARRAY *points)
Definition: lwline.c:42
POINTARRAY * points
Definition: liblwgeom.h:422
Here is the call graph for this function:
Here is the caller graph for this function: