PostGIS  2.4.9dev-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 1862 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().

1863 {
1864  char* ptr = output;
1865  int i;
1866  LWGEOM* subgeom;
1867 
1868  ptr += sprintf( ptr, "<%sMultiSurface", prefix );
1869  if (srs)
1870  {
1871  ptr += sprintf(ptr, " srsName=\"%s\"", srs);
1872  }
1873  if (id)
1874  {
1875  ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id );
1876  }
1877  ptr += sprintf( ptr, ">" );
1878 
1879  for( i = 0; i < sur->ngeoms; ++i )
1880  {
1881  subgeom = sur->geoms[i];
1882  if( subgeom->type == POLYGONTYPE )
1883  {
1884  ptr += asgml3_poly_buf( (LWPOLY*)sur->geoms[i], srs, ptr, precision, opts, 0, prefix, id );
1885  }
1886  else if( subgeom->type == CURVEPOLYTYPE )
1887  {
1888  ptr += asgml3_curvepoly_buf( (LWCURVEPOLY*)sur->geoms[i], srs, ptr, precision, opts, prefix, id );
1889  }
1890  }
1891  ptr += sprintf( ptr, "</%sMultiSurface>", prefix );
1892  return ptr - output;
1893 }
#define POLYGONTYPE
Definition: liblwgeom.h:87
#define CURVEPOLYTYPE
Definition: liblwgeom.h:94
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:1034
int ngeoms
Definition: liblwgeom.h:559
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:1258
LWGEOM ** geoms
Definition: liblwgeom.h:561
uint8_t type
Definition: liblwgeom.h:396
opts
Definition: ovdump.py:44
Here is the call graph for this function:
Here is the caller graph for this function: