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

◆ pointArray_to_geojson()

static void pointArray_to_geojson ( stringbuffer_t sb,
const POINTARRAY pa,
const geojson_opts opts 
)
static

Definition at line 76 of file lwout_geojson.c.

77{
78 if (!pa || pa->npoints == 0)
79 {
80 stringbuffer_append_len(sb, "[]", 2);
81 return;
82 }
83
85 for (uint32_t i = 0; i < pa->npoints; i++)
86 {
87 if (i) stringbuffer_append_char(sb, ',');
88 coordinate_to_geojson(sb, pa, i, opts);
89 }
91 return;
92}
static void coordinate_to_geojson(stringbuffer_t *sb, const POINTARRAY *pa, uint32_t i, const geojson_opts *opts)
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 npoints
Definition liblwgeom.h:427

References coordinate_to_geojson(), POINTARRAY::npoints, stringbuffer_append_char(), and stringbuffer_append_len().

Referenced by asgeojson_line_coords(), asgeojson_poly_coords(), and asgeojson_triangle().

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