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

284 {
285  char *ptr = output;
286 
287  ptr += sprintf(ptr, "<%sPoint", prefix);
288  if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
289  if ( lwpoint_is_empty(point) )
290  {
291  ptr += sprintf(ptr, "/>");
292  return (ptr-output);
293  }
294  ptr += sprintf(ptr, ">");
295  ptr += sprintf(ptr, "<%scoordinates>", prefix);
296  ptr += pointArray_toGML2(point->point, ptr, precision);
297  ptr += sprintf(ptr, "</%scoordinates></%sPoint>", prefix, prefix);
298 
299  return (ptr-output);
300 }
static uint8_t precision
Definition: cu_in_twkb.c:25
int lwpoint_is_empty(const LWPOINT *point)
Definition: lwpoint.c:291
static size_t pointArray_toGML2(POINTARRAY *pa, char *buf, int precision)
Definition: lwout_gml.c:662
POINTARRAY * point
Definition: liblwgeom.h:414

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: