PostGIS  3.0.6dev-r@@SVN_REVISION@@
lwgeom_out_geojson.c File Reference
#include "../postgis_config.h"
#include "postgres.h"
#include "funcapi.h"
#include "miscadmin.h"
#include "access/htup_details.h"
#include "access/transam.h"
#include "catalog/pg_type.h"
#include "executor/spi.h"
#include "lib/stringinfo.h"
#include "libpq/pqformat.h"
#include "mb/pg_wchar.h"
#include "parser/parse_coerce.h"
#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/date.h"
#include "utils/datetime.h"
#include "utils/lsyscache.h"
#include "utils/json.h"
#include "utils/jsonapi.h"
#include "utils/typcache.h"
#include "utils/syscache.h"
#include "lwgeom_pg.h"
#include "lwgeom_log.h"
#include "liblwgeom.h"
Include dependency graph for lwgeom_out_geojson.c:

Go to the source code of this file.

Enumerations

enum  JsonTypeCategory {
  JSONTYPE_NULL , JSONTYPE_BOOL , JSONTYPE_NUMERIC , JSONTYPE_DATE ,
  JSONTYPE_TIMESTAMP , JSONTYPE_TIMESTAMPTZ , JSONTYPE_JSON , JSONTYPE_ARRAY ,
  JSONTYPE_COMPOSITE , JSONTYPE_CAST , JSONTYPE_OTHER
}
 

Functions

static void array_dim_to_json (StringInfo result, int dim, int ndims, int *dims, Datum *vals, bool *nulls, int *valcount, JsonTypeCategory tcategory, Oid outfuncoid, bool use_line_feeds)
 
static void array_to_json_internal (Datum array, StringInfo result, bool use_line_feeds)
 
static void composite_to_geojson (Datum composite, char *geom_column_name, int32 maxdecimaldigits, StringInfo result, bool use_line_feeds, Oid geom_oid, Oid geog_oid)
 
static void composite_to_json (Datum composite, StringInfo result, bool use_line_feeds)
 
static void datum_to_json (Datum val, bool is_null, StringInfo result, JsonTypeCategory tcategory, Oid outfuncoid, bool key_scalar)
 
static void json_categorize_type (Oid typoid, JsonTypeCategory *tcategory, Oid *outfuncoid)
 
static char * postgis_JsonEncodeDateTime (char *buf, Datum value, Oid typid)
 
static int postgis_time2tm (TimeADT time, struct pg_tm *tm, fsec_t *fsec)
 
static int postgis_timetz2tm (TimeTzADT *time, struct pg_tm *tm, fsec_t *fsec, int *tzp)
 
Datum row_to_geojson (PG_FUNCTION_ARGS)
 
Datum LWGEOM_asGeoJson (PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1 (ST_AsGeoJsonRow)
 
Datum ST_AsGeoJsonRow (PG_FUNCTION_ARGS)