PostGIS  2.2.7dev-r@@SVN_REVISION@@
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 949 of file lwout_gml.c.

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

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

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

Here is the call graph for this function:

Here is the caller graph for this function: