PostGIS  2.2.8dev-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 270 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().

271 {
272  char *ptr = output;
273 
274  ptr += sprintf(ptr, "<%sPoint", prefix);
275  if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
276  if ( lwpoint_is_empty(point) )
277  {
278  ptr += sprintf(ptr, "/>");
279  return (ptr-output);
280  }
281  ptr += sprintf(ptr, ">");
282  ptr += sprintf(ptr, "<%scoordinates>", prefix);
283  ptr += pointArray_toGML2(point->point, ptr, precision);
284  ptr += sprintf(ptr, "</%scoordinates></%sPoint>", prefix, prefix);
285 
286  return (ptr-output);
287 }
POINTARRAY * point
Definition: liblwgeom.h:395
uint8_t precision
Definition: cu_in_twkb.c:25
int lwpoint_is_empty(const LWPOINT *point)
Definition: lwpoint.c:260
static size_t pointArray_toGML2(POINTARRAY *pa, char *buf, int precision)
Definition: lwout_gml.c:649
Here is the call graph for this function:
Here is the caller graph for this function: