PostGIS  2.2.7dev-r@@SVN_REVISION@@
LWLINE* lwline_grid ( const LWLINE line,
const gridspec grid 
)

Definition at line 566 of file lwline.c.

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

Referenced by lwgeom_grid().

567 {
568  LWLINE *oline;
569  POINTARRAY *opa;
570 
571  opa = ptarray_grid(line->points, grid);
572 
573  /* Skip line3d with less then 2 points */
574  if ( opa->npoints < 2 ) return NULL;
575 
576  /* TODO: grid bounding box... */
577  oline = lwline_construct(line->srid, NULL, opa);
578 
579  return oline;
580 }
int npoints
Definition: liblwgeom.h:355
int32_t srid
Definition: liblwgeom.h:405
POINTARRAY * ptarray_grid(const POINTARRAY *pa, const gridspec *grid)
Definition: ptarray.c:1843
LWLINE * lwline_construct(int srid, GBOX *bbox, POINTARRAY *points)
Definition: lwline.c:29
POINTARRAY * points
Definition: liblwgeom.h:406

Here is the call graph for this function:

Here is the caller graph for this function: