PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ asgeojson_line_coords()

static void asgeojson_line_coords ( stringbuffer_t sb,
const LWLINE line,
const geojson_opts opts,
int  tagged 
)
static

Definition at line 141 of file lwout_geojson.c.

142 {
143  if (tagged == geojson_tagged) stringbuffer_append_len(sb, "\"coordinates\":", 14);
144  if (lwgeom_is_empty((LWGEOM*)line))
145  stringbuffer_append_len(sb, "[]", 2);
146  else
147  pointArray_to_geojson(sb, line->points, opts);
148  return;
149 }
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 pointArray_to_geojson(stringbuffer_t *sb, const POINTARRAY *pa, const geojson_opts *opts)
Definition: lwout_geojson.c:76
@ 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 geojson_tagged, lwgeom_is_empty(), ovdump::opts, pointArray_to_geojson(), LWLINE::points, and stringbuffer_append_len().

Referenced by asgeojson_line(), and asgeojson_multiline().

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