PostGIS  3.1.6dev-r@@SVN_REVISION@@

◆ asgml2_point_buf()

static size_t asgml2_point_buf ( const LWPOINT point,
const char *  srs,
char *  output,
int  precision,
const char *  prefix 
)
static

Definition at line 311 of file lwout_gml.c.

312 {
313  char *ptr = output;
314 
315  ptr += sprintf(ptr, "<%sPoint", prefix);
316  if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
317  if ( lwpoint_is_empty(point) )
318  {
319  ptr += sprintf(ptr, "/>");
320  return (ptr-output);
321  }
322  ptr += sprintf(ptr, ">");
323  ptr += sprintf(ptr, "<%scoordinates>", prefix);
324  ptr += pointArray_toGML2(point->point, ptr, precision);
325  ptr += sprintf(ptr, "</%scoordinates></%sPoint>", prefix, prefix);
326 
327  return (ptr-output);
328 }
static uint8_t precision
Definition: cu_in_twkb.c:25
int lwpoint_is_empty(const LWPOINT *point)
static size_t pointArray_toGML2(POINTARRAY *pa, char *buf, int precision)
Definition: lwout_gml.c:678
POINTARRAY * point
Definition: liblwgeom.h:485

References lwpoint_is_empty(), LWPOINT::point, pointArray_toGML2(), and precision.

Referenced by asgml2_collection_buf(), asgml2_multi_buf(), and asgml2_point().

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