85 elog(ERROR,
"You need JSON-C for ST_GeomFromGeoJSON");
100 geojson_input = PG_GETARG_TEXT_P(0);
107 elog(ERROR,
"lwgeom_from_geojson returned NULL");
113 srid = GetSRIDCacheBySRS(fcinfo, srs);
118 geom = geometry_serialize(lwgeom);
121 PG_RETURN_POINTER(geom);
LWGEOM * lwgeom_from_geojson(const char *geojson, char **srs)
Create an LWGEOM object from a GeoJSON representation.
void lwgeom_set_srid(LWGEOM *geom, int32_t srid)
Set the SRID on an LWGEOM For collections, only the parent gets an SRID, all the children get SRID_UN...
void lwgeom_free(LWGEOM *geom)
static char * text2cstring(const text *textptr)