PostGIS  2.1.10dev-r@@SVN_REVISION@@
static LWCURVEPOLY* lwcurvepoly_from_wkb_state ( wkb_parse_state s)
static

CURVEPOLYTYPE.

Definition at line 566 of file lwin_wkb.c.

References wkb_parse_state::has_m, wkb_parse_state::has_z, integer_from_wkb_state(), LW_FAILURE, lwcurvepoly_add_ring(), lwcurvepoly_construct_empty(), lwerror(), lwgeom_from_wkb_state(), and wkb_parse_state::srid.

Referenced by lwgeom_from_wkb_state().

567 {
568  uint32_t ngeoms = integer_from_wkb_state(s);
570  LWGEOM *geom = NULL;
571  int i;
572 
573  /* Empty collection? */
574  if ( ngeoms == 0 )
575  return cp;
576 
577  for ( i = 0; i < ngeoms; i++ )
578  {
579  geom = lwgeom_from_wkb_state(s);
580  if ( lwcurvepoly_add_ring(cp, geom) == LW_FAILURE )
581  lwerror("Unable to add geometry (%p) to curvepoly (%p)", geom, cp);
582  }
583 
584  return cp;
585 }
static uint32_t integer_from_wkb_state(wkb_parse_state *s)
Int32 Read 4-byte integer and advance the parse state forward.
Definition: lwin_wkb.c:250
#define LW_FAILURE
Definition: liblwgeom.h:54
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:67
LWGEOM * geom
LWCURVEPOLY * lwcurvepoly_construct_empty(int srid, char hasz, char hasm)
Definition: lwcurvepoly.c:23
LWGEOM * lwgeom_from_wkb_state(wkb_parse_state *s)
Internal function declarations.
Definition: lwin_wkb.c:632
uint32_t srid
Definition: lwin_wkb.c:25
int lwcurvepoly_add_ring(LWCURVEPOLY *poly, LWGEOM *ring)
Add a ring, allocating extra space if necessary.
Definition: lwcurvepoly.c:59

Here is the call graph for this function:

Here is the caller graph for this function: