PostGIS  2.4.9dev-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 962 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().

963 {
964  char* ptr = output;
965  int dimension=2;
966 
967  if (FLAGS_GET_Z(circ->flags))
968  {
969  dimension = 3;
970  }
971 
972  ptr += sprintf(ptr, "<%sCurve", prefix);
973  if (srs)
974  {
975  ptr += sprintf(ptr, " srsName=\"%s\"", srs);
976  }
977  if (id)
978  {
979  ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id);
980  }
981  ptr += sprintf(ptr, ">");
982  ptr += sprintf(ptr, "<%ssegments>", prefix);
983  ptr += sprintf(ptr, "<%sArcString>", prefix);
984  ptr += sprintf(ptr, "<%sposList", prefix);
985 
986  if (IS_DIMS(opts))
987  {
988  ptr += sprintf(ptr, " srsDimension=\"%d\"", dimension);
989  }
990  ptr += sprintf(ptr, ">");
991 
992  ptr += pointArray_toGML3(circ->points, ptr, precision, opts);
993  ptr += sprintf(ptr, "</%sposList>", prefix);
994  ptr += sprintf(ptr, "</%sArcString>", prefix);
995  ptr += sprintf(ptr, "</%ssegments>", prefix);
996  ptr += sprintf(ptr, "</%sCurve>", prefix);
997  return (ptr-output);
998 }
uint8_t flags
Definition: liblwgeom.h:441
#define IS_DIMS(x)
Definition: liblwgeom.h:1544
uint8_t precision
Definition: cu_in_twkb.c:25
#define FLAGS_GET_Z(flags)
Macros for manipulating the &#39;flags&#39; byte.
Definition: liblwgeom.h:140
static size_t pointArray_toGML3(POINTARRAY *pa, char *buf, int precision, int opts)
Definition: lwout_gml.c:1909
POINTARRAY * points
Definition: liblwgeom.h:444
opts
Definition: ovdump.py:44
Here is the call graph for this function:
Here is the caller graph for this function: