440 int option = PG_GETARG_INT32(2);
455 if (option & 2 || option & 4)
465 elog(ERROR,
"SRID SRID_DEFAULT unknown in spatial_ref_sys table");
470 if (option & 1) has_bbox = 1;
474 PG_FREE_IF_COPY(g, 0);
477 result = cstring_to_text(geojson);
480 PG_RETURN_TEXT_P(result);
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
char * lwgeom_to_geojson(const LWGEOM *geo, char *srs, int precision, int has_bbox)
Takes a GEOMETRY and returns a GeoJson representation.
char * getSRSbySRID(FunctionCallInfo fcinfo, int32_t srid, bool short_crs)