PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ asgeojson_point_coords()

static void asgeojson_point_coords ( stringbuffer_t sb,
const LWPOINT point,
const geojson_opts opts,
int  tagged 
)
static

Point Geometry.

Definition at line 130 of file lwout_geojson.c.

131 {
132  if (tagged == geojson_tagged) stringbuffer_append_len(sb, "\"coordinates\":", 14);
133  if (lwgeom_is_empty((LWGEOM*)point))
134  stringbuffer_append_len(sb, "[]", 2);
135  else
136  coordinate_to_geojson(sb, point->point, 0, opts);
137  return;
138 }
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
Definition: lwinline.h:203
static void coordinate_to_geojson(stringbuffer_t *sb, const POINTARRAY *pa, uint32_t i, const geojson_opts *opts)
Definition: lwout_geojson.c:51
@ geojson_tagged
Definition: lwout_geojson.c:42
opts
Definition: ovdump.py:45
static void stringbuffer_append_len(stringbuffer_t *s, const char *a, size_t alen)
Append the specified string to the stringbuffer_t using known length.
Definition: stringbuffer.h:93

References coordinate_to_geojson(), geojson_tagged, lwgeom_is_empty(), ovdump::opts, LWPOINT::point, and stringbuffer_append_len().

Referenced by asgeojson_multipoint(), and asgeojson_point().

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