Takes a GEOMETRY and returns a GeoJson representation.
Definition at line 48 of file lwout_geojson.c.
81 lwerror(
"lwgeom_to_geojson: '%s' geometry type not supported",
int lwgeom_calculate_gbox_cartesian(const LWGEOM *lwgeom, GBOX *gbox)
Calculate the 2-4D bounding box of a geometry.
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
#define OUT_MAX_DOUBLE_PRECISION
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
static char * asgeojson_collection(const LWCOLLECTION *col, char *srs, GBOX *bbox, int precision)
static char * asgeojson_multipolygon(const LWMPOLY *mpoly, char *srs, GBOX *bbox, int precision)
static char * asgeojson_multipoint(const LWMPOINT *mpoint, char *srs, GBOX *bbox, int precision)
static char * asgeojson_point(const LWPOINT *point, char *srs, GBOX *bbox, int precision)
static char * asgeojson_poly(const LWPOLY *poly, char *srs, GBOX *bbox, int precision)
static char * asgeojson_multiline(const LWMLINE *mline, char *srs, GBOX *bbox, int precision)
static char * asgeojson_line(const LWLINE *line, char *srs, GBOX *bbox, int precision)
References asgeojson_collection(), asgeojson_line(), asgeojson_multiline(), asgeojson_multipoint(), asgeojson_multipolygon(), asgeojson_point(), asgeojson_poly(), COLLECTIONTYPE, LINETYPE, lwerror(), lwgeom_calculate_gbox_cartesian(), lwtype_name(), MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, OUT_MAX_DOUBLE_PRECISION, POINTTYPE, POLYGONTYPE, precision, LWGEOM::type, and ovdump::type.
Referenced by do_geojson_test(), do_geojson_unsupported(), geography_as_geojson(), and LWGEOM_asGeoJson().