391 const char *srs = NULL;
394 int option = PG_GETARG_INT32(2);
407 if (option & 2 || option & 4)
417 elog(ERROR,
"SRID SRID_DEFAULT unknown in spatial_ref_sys table");
422 if (option & 1) has_bbox = 1;
426 PG_FREE_IF_COPY(g, 0);
428 PG_RETURN_TEXT_P(geojson);
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.