288 const char *srs = NULL;
294 srs = GetSRSCacheBySRID(fcinfo, lwgeom->
srid, short_crs);
298 cstr = palloc0(VARSIZE_ANY_EXHDR(geojson) + 1);
299 memcpy(cstr, VARDATA(geojson), VARSIZE_ANY_EXHDR(geojson));
300 PG_RETURN_DATUM(DirectFunctionCall1(jsonb_in, PointerGetDatum(cstr)));
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
lwvarlena_t * lwgeom_to_geojson(const LWGEOM *geo, const char *srs, int precision, int has_bbox)
Takes a GEOMETRY and returns a GeoJson representation.
#define LW_TRUE
Return types for functions with status returns.
#define SRID_UNKNOWN
Unknown SRID value.