PostGIS  2.4.9dev-r@@SVN_REVISION@@
lwout_geojson.c File Reference
#include "liblwgeom_internal.h"
#include <string.h>
#include <assert.h>
Include dependency graph for lwout_geojson.c:

Go to the source code of this file.

Macros

#define BUFSIZE   OUT_MAX_DIGS_DOUBLE+OUT_MAX_DOUBLE_PRECISION
 

Functions

static char * asgeojson_point (const LWPOINT *point, char *srs, GBOX *bbox, int precision)
 
static char * asgeojson_line (const LWLINE *line, char *srs, GBOX *bbox, int precision)
 
static char * asgeojson_poly (const LWPOLY *poly, char *srs, GBOX *bbox, int precision)
 
static char * asgeojson_multipoint (const LWMPOINT *mpoint, char *srs, GBOX *bbox, int precision)
 
static char * asgeojson_multiline (const LWMLINE *mline, char *srs, GBOX *bbox, int precision)
 
static char * asgeojson_multipolygon (const LWMPOLY *mpoly, char *srs, GBOX *bbox, int precision)
 
static char * asgeojson_collection (const LWCOLLECTION *col, char *srs, GBOX *bbox, int precision)
 
static size_t asgeojson_geom_size (const LWGEOM *geom, GBOX *bbox, int precision)
 
static size_t asgeojson_geom_buf (const LWGEOM *geom, char *output, GBOX *bbox, int precision)
 
static size_t pointArray_to_geojson (POINTARRAY *pa, char *buf, int precision)
 
static size_t pointArray_geojson_size (POINTARRAY *pa, int precision)
 Returns maximum size of rendered pointarray in bytes. More...
 
char * lwgeom_to_geojson (const LWGEOM *geom, char *srs, int precision, int has_bbox)
 Takes a GEOMETRY and returns a GeoJson representation. More...
 
static size_t asgeojson_srs_size (char *srs)
 Handle SRS. More...
 
static size_t asgeojson_srs_buf (char *output, char *srs)
 
static size_t asgeojson_bbox_size (int hasz, int precision)
 Handle Bbox. More...
 
static size_t asgeojson_bbox_buf (char *output, GBOX *bbox, int hasz, int precision)
 
static size_t asgeojson_point_size (const LWPOINT *point, char *srs, GBOX *bbox, int precision)
 Point Geometry. More...
 
static size_t asgeojson_point_buf (const LWPOINT *point, char *srs, char *output, GBOX *bbox, int precision)
 
static size_t asgeojson_line_size (const LWLINE *line, char *srs, GBOX *bbox, int precision)
 Line Geometry. More...
 
static size_t asgeojson_line_buf (const LWLINE *line, char *srs, char *output, GBOX *bbox, int precision)
 
static size_t asgeojson_poly_size (const LWPOLY *poly, char *srs, GBOX *bbox, int precision)
 Polygon Geometry. More...
 
static size_t asgeojson_poly_buf (const LWPOLY *poly, char *srs, char *output, GBOX *bbox, int precision)
 
static size_t asgeojson_multipoint_size (const LWMPOINT *mpoint, char *srs, GBOX *bbox, int precision)
 Multipoint Geometry. More...
 
static size_t asgeojson_multipoint_buf (const LWMPOINT *mpoint, char *srs, char *output, GBOX *bbox, int precision)
 
static size_t asgeojson_multiline_size (const LWMLINE *mline, char *srs, GBOX *bbox, int precision)
 Multiline Geometry. More...
 
static size_t asgeojson_multiline_buf (const LWMLINE *mline, char *srs, char *output, GBOX *bbox, int precision)
 
static size_t asgeojson_multipolygon_size (const LWMPOLY *mpoly, char *srs, GBOX *bbox, int precision)
 MultiPolygon Geometry. More...
 
static size_t asgeojson_multipolygon_buf (const LWMPOLY *mpoly, char *srs, char *output, GBOX *bbox, int precision)
 
static size_t asgeojson_collection_size (const LWCOLLECTION *col, char *srs, GBOX *bbox, int precision)
 Collection Geometry. More...
 
static size_t asgeojson_collection_buf (const LWCOLLECTION *col, char *srs, char *output, GBOX *bbox, int precision)
 
static int lwprint_double (double d, int maxdd, char *buf, size_t bufsize)