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

◆ asgeojson_multiline()

static void asgeojson_multiline ( stringbuffer_t sb,
const LWMLINE mline,
const geojson_opts opts 
)
static

Multipoint Geometry.

Definition at line 261 of file lwout_geojson.c.

262{
263 uint32_t i, ngeoms = mline->ngeoms;
264 stringbuffer_append_len(sb, "{\"type\":\"MultiLineString\",", 26);
265 asgeojson_srs(sb, opts);
266 asgeojson_bbox(sb, opts);
267 stringbuffer_append_len(sb, "\"coordinates\":[", 15);
268
269 if (lwgeom_is_empty((LWGEOM*)mline))
270 ngeoms = 0;
271
272 for (i=0; i < ngeoms; i++)
273 {
274 if (i) stringbuffer_append_char(sb, ',');
275 asgeojson_line_coords(sb, mline->geoms[i], opts, geojson_untagged);
276 }
277 stringbuffer_append_len(sb, "]}", 2);
278 return;
279}
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 asgeojson_srs(stringbuffer_t *sb, const geojson_opts *opts)
static void asgeojson_bbox(stringbuffer_t *sb, const geojson_opts *opts)
@ geojson_untagged
static void asgeojson_line_coords(stringbuffer_t *sb, const LWLINE *line, const geojson_opts *opts, int tagged)
static void stringbuffer_append_char(stringbuffer_t *s, char c)
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.
uint32_t ngeoms
Definition liblwgeom.h:552

References asgeojson_bbox(), asgeojson_line_coords(), asgeojson_srs(), geojson_untagged, LWMLINE::geoms, lwgeom_is_empty(), LWMLINE::ngeoms, stringbuffer_append_char(), and stringbuffer_append_len().

Referenced by asgeojson_geometry().

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