PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ asgml3_multisurface_buf()

static size_t asgml3_multisurface_buf ( const LWMSURFACE sur,
const char *  srs,
char *  output,
int  precision,
int  opts,
const char *  prefix,
const char *  id 
)
static

Definition at line 1849 of file lwout_gml.c.

References asgml3_curvepoly_buf(), asgml3_poly_buf(), CURVEPOLYTYPE, LWMSURFACE::geoms, LWMSURFACE::ngeoms, POLYGONTYPE, and LWGEOM::type.

Referenced by asgml3_multisurface().

1850 {
1851  char* ptr = output;
1852  int i;
1853  LWGEOM* subgeom;
1854 
1855  ptr += sprintf( ptr, "<%sMultiSurface", prefix );
1856  if (srs)
1857  {
1858  ptr += sprintf(ptr, " srsName=\"%s\"", srs);
1859  }
1860  if (id)
1861  {
1862  ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id );
1863  }
1864  ptr += sprintf( ptr, ">" );
1865 
1866  for( i = 0; i < sur->ngeoms; ++i )
1867  {
1868  subgeom = sur->geoms[i];
1869  if( subgeom->type == POLYGONTYPE )
1870  {
1871  ptr += asgml3_poly_buf( (LWPOLY*)sur->geoms[i], srs, ptr, precision, opts, 0, prefix, id );
1872  }
1873  else if( subgeom->type == CURVEPOLYTYPE )
1874  {
1875  ptr += asgml3_curvepoly_buf( (LWCURVEPOLY*)sur->geoms[i], srs, ptr, precision, opts, prefix, id );
1876  }
1877  }
1878  ptr += sprintf( ptr, "</%sMultiSurface>", prefix );
1879  return ptr - output;
1880 }
#define POLYGONTYPE
Definition: liblwgeom.h:72
#define CURVEPOLYTYPE
Definition: liblwgeom.h:79
uint8_t precision
Definition: cu_in_twkb.c:25
static size_t asgml3_poly_buf(const LWPOLY *poly, const char *srs, char *output, int precision, int opts, int is_patch, const char *prefix, const char *id)
Definition: lwout_gml.c:1021
int ngeoms
Definition: liblwgeom.h:543
static size_t asgml3_curvepoly_buf(const LWCURVEPOLY *poly, const char *srs, char *output, int precision, int opts, const char *prefix, const char *id)
Definition: lwout_gml.c:1245
LWGEOM ** geoms
Definition: liblwgeom.h:545
uint8_t type
Definition: liblwgeom.h:380
opts
Definition: ovdump.py:44
Here is the call graph for this function:
Here is the caller graph for this function: