Definition at line 288 of file lwout_geojson.c.
References asgeojson_bbox_buf(), asgeojson_srs_buf(), LWPOLY::flags, FLAGS_GET_Z, LWPOLY::nrings, pointArray_to_geojson(), and LWPOLY::rings.
Referenced by asgeojson_geom_buf(), and asgeojson_poly().
293 ptr += sprintf(ptr,
"{\"type\":\"Polygon\",");
296 ptr += sprintf(ptr,
"\"coordinates\":[");
297 for (i=0; i<poly->
nrings; i++)
299 if (i) ptr += sprintf(ptr,
",");
300 ptr += sprintf(ptr,
"[");
302 ptr += sprintf(ptr,
"]");
304 ptr += sprintf(ptr,
"]}");
static size_t asgeojson_srs_buf(char *output, char *srs)
static size_t asgeojson_bbox_buf(char *output, GBOX *bbox, int hasz, int precision)
static size_t pointArray_to_geojson(POINTARRAY *pa, char *buf, int precision)
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.