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

Definition at line 343 of file lwgeom_functions_analytic.c.

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

Referenced by lwgeom_grid().

344 {
345  LWLINE *oline;
346  POINTARRAY *opa;
347 
348  opa = ptarray_grid(line->points, grid);
349 
350  /* Skip line3d with less then 2 points */
351  if ( opa->npoints < 2 ) return NULL;
352 
353  /* TODO: grid bounding box... */
354  oline = lwline_construct(line->srid, NULL, opa);
355 
356  return oline;
357 }
POINTARRAY * ptarray_grid(POINTARRAY *pa, gridspec *grid)
int npoints
Definition: liblwgeom.h:327
int32_t srid
Definition: liblwgeom.h:377
LWLINE * lwline_construct(int srid, GBOX *bbox, POINTARRAY *points)
Definition: lwline.c:29
POINTARRAY * points
Definition: liblwgeom.h:378

Here is the call graph for this function:

Here is the caller graph for this function: