PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ 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 1842 of file lwout_gml.c.

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

References asgml3_curvepoly_buf(), asgml3_poly_buf(), CURVEPOLYTYPE, LWMSURFACE::geoms, LWMSURFACE::ngeoms, 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: