PostGIS  2.1.10dev-r@@SVN_REVISION@@
static size_t asgml2_point_buf ( const LWPOINT point,
const char *  srs,
char *  output,
int  precision,
const char *  prefix 
)
static

Definition at line 263 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().

264 {
265  char *ptr = output;
266 
267  ptr += sprintf(ptr, "<%sPoint", prefix);
268  if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
269  if ( lwpoint_is_empty(point) ) {
270  ptr += sprintf(ptr, "/>");
271  return (ptr-output);
272  }
273  ptr += sprintf(ptr, ">");
274  ptr += sprintf(ptr, "<%scoordinates>", prefix);
275  ptr += pointArray_toGML2(point->point, ptr, precision);
276  ptr += sprintf(ptr, "</%scoordinates></%sPoint>", prefix, prefix);
277 
278  return (ptr-output);
279 }
POINTARRAY * point
Definition: liblwgeom.h:367
int lwpoint_is_empty(const LWPOINT *point)
Definition: lwpoint.c:258
static size_t pointArray_toGML2(POINTARRAY *pa, char *buf, int precision)
Definition: lwout_gml.c:637

Here is the call graph for this function:

Here is the caller graph for this function: