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

◆ asgml3_psurface()

static void asgml3_psurface ( stringbuffer_t sb,
const LWPSURFACE psur,
const GML_Options opts 
)
static

Definition at line 768 of file lwout_gml.c.

769{
770 uint32_t i;
771
772 /* Subgeoms don't get an SRS */
773 GML_Options subopts = *opts;
774 subopts.srs = 0;
775 subopts.is_patch = 1;
776
777 /* Open outmost tag */
778 stringbuffer_aprintf(sb, "<%sPolyhedralSurface", opts->prefix);
779 if (opts->srs)
780 stringbuffer_aprintf(sb, " srsName=\"%s\"", opts->srs);
781 if (opts->id)
782 stringbuffer_aprintf(sb, " %sid=\"%s\"", opts->prefix, opts->id);
783 stringbuffer_append(sb, ">");
784 stringbuffer_aprintf(sb, "<%spolygonPatches>", opts->prefix);
785
786 for (i=0; i<psur->ngeoms; i++)
787 {
788 asgml3_poly(sb, psur->geoms[i], &subopts);
789 }
790
791 /* Close outmost tag */
792 stringbuffer_aprintf(sb, "</%spolygonPatches>", opts->prefix);
793 stringbuffer_aprintf(sb, "</%sPolyhedralSurface>", opts->prefix);
794}
static void asgml3_poly(stringbuffer_t *sb, const LWPOLY *poly, const GML_Options *opts)
Definition lwout_gml.c:456
int stringbuffer_aprintf(stringbuffer_t *s, const char *fmt,...)
Appends a formatted string to the current string buffer, using the format and argument list provided.
static void stringbuffer_append(stringbuffer_t *s, const char *a)
Append the specified string to the stringbuffer_t.
const char * srs
Definition lwout_gml.c:41
LWPOLY ** geoms
Definition liblwgeom.h:645
uint32_t ngeoms
Definition liblwgeom.h:650

References asgml3_poly(), LWPSURFACE::geoms, GML_Options::is_patch, LWPSURFACE::ngeoms, GML_Options::srs, stringbuffer_append(), and stringbuffer_aprintf().

Referenced by lwgeom_to_gml3().

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