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

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

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: