PostGIS  2.5.7dev-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 1843 of file lwout_gml.c.

1844 {
1845  char* ptr = output;
1846  uint32_t i;
1847  LWGEOM* subgeom;
1848 
1849  ptr += sprintf( ptr, "<%sMultiSurface", prefix );
1850  if (srs)
1851  {
1852  ptr += sprintf(ptr, " srsName=\"%s\"", srs);
1853  }
1854  if (id)
1855  {
1856  ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id );
1857  }
1858  ptr += sprintf( ptr, ">" );
1859 
1860  for( i = 0; i < sur->ngeoms; ++i )
1861  {
1862  subgeom = sur->geoms[i];
1863  if( subgeom->type == POLYGONTYPE )
1864  {
1865  ptr += asgml3_poly_buf( (LWPOLY*)sur->geoms[i], srs, ptr, precision, opts, 0, prefix, id );
1866  }
1867  else if( subgeom->type == CURVEPOLYTYPE )
1868  {
1869  ptr += asgml3_curvepoly_buf( (LWCURVEPOLY*)sur->geoms[i], srs, ptr, precision, opts, prefix, id );
1870  }
1871  }
1872  ptr += sprintf( ptr, "</%sMultiSurface>", prefix );
1873  return ptr - output;
1874 }
static uint8_t precision
Definition: cu_in_twkb.c:25
#define CURVEPOLYTYPE
Definition: liblwgeom.h:94
#define POLYGONTYPE
Definition: liblwgeom.h:87
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:1239
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:1015
opts
Definition: ovdump.py:44
uint8_t type
Definition: liblwgeom.h:399
uint32_t ngeoms
Definition: liblwgeom.h:562
LWGEOM ** geoms
Definition: liblwgeom.h:564
unsigned int uint32_t
Definition: uthash.h:78

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

Referenced by asgml3_multisurface().

Here is the call graph for this function:
Here is the caller graph for this function: