PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ 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:199
static void pointArray_to_geojson(stringbuffer_t *sb, const POINTARRAY *pa, const geojson_opts *opts)
@ geojson_tagged
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.

References geojson_tagged, lwgeom_is_empty(), 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: