PostGIS  3.0.0dev-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.

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

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

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 }
POINTARRAY * point
Definition: liblwgeom.h:413
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:662
Here is the call graph for this function:
Here is the caller graph for this function: