PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ asgml3_circstring_buf()

static size_t asgml3_circstring_buf ( const LWCIRCSTRING circ,
const char *  srs,
char *  output,
int  precision,
int  opts,
const char *  prefix,
const char *  id 
)
static

Definition at line 942 of file lwout_gml.c.

943 {
944  char* ptr = output;
945  int dimension=2;
946 
947  if (FLAGS_GET_Z(circ->flags))
948  {
949  dimension = 3;
950  }
951 
952  ptr += sprintf(ptr, "<%sCurve", prefix);
953  if (srs)
954  {
955  ptr += sprintf(ptr, " srsName=\"%s\"", srs);
956  }
957  if (id)
958  {
959  ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id);
960  }
961  ptr += sprintf(ptr, ">");
962  ptr += sprintf(ptr, "<%ssegments>", prefix);
963  ptr += sprintf(ptr, "<%sArcString>", prefix);
964  ptr += sprintf(ptr, "<%sposList", prefix);
965 
966  if (IS_DIMS(opts))
967  {
968  ptr += sprintf(ptr, " srsDimension=\"%d\"", dimension);
969  }
970  ptr += sprintf(ptr, ">");
971 
972  ptr += pointArray_toGML3(circ->points, ptr, precision, opts);
973  ptr += sprintf(ptr, "</%sposList>", prefix);
974  ptr += sprintf(ptr, "</%sArcString>", prefix);
975  ptr += sprintf(ptr, "</%ssegments>", prefix);
976  ptr += sprintf(ptr, "</%sCurve>", prefix);
977  return (ptr-output);
978 }
static uint8_t precision
Definition: cu_in_twkb.c:25
#define IS_DIMS(x)
Definition: liblwgeom.h:1657
#define FLAGS_GET_Z(flags)
Definition: liblwgeom.h:179
static size_t pointArray_toGML3(POINTARRAY *pa, char *buf, int precision, int opts)
Definition: lwout_gml.c:1889
opts
Definition: ovdump.py:45
lwflags_t flags
Definition: liblwgeom.h:495
POINTARRAY * points
Definition: liblwgeom.h:493

References LWCIRCSTRING::flags, FLAGS_GET_Z, IS_DIMS, ovdump::opts, pointArray_toGML3(), LWCIRCSTRING::points, and precision.

Referenced by asgml3_circstring(), asgml3_curvepoly_buf(), and asgml3_multicurve_buf().

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