PostGIS  2.2.7dev-r@@SVN_REVISION@@
Datum parse_WKT_lwgeom ( PG_FUNCTION_ARGS  )

Definition at line 706 of file lwgeom_inout.c.

References LWGEOM_in(), and text2cstring().

707 {
708  text *wkt_text = PG_GETARG_TEXT_P(0);
709  char *wkt;
710  Datum result;
711 
712  /* Unwrap the PgSQL text type into a cstring */
713  wkt = text2cstring(wkt_text);
714 
715  /* Now we call over to the geometry_in function */
716  result = DirectFunctionCall1(LWGEOM_in, CStringGetDatum(wkt));
717 
718  /* Return null on null */
719  if ( ! result )
720  PG_RETURN_NULL();
721 
722  PG_RETURN_DATUM(result);
723 }
char * text2cstring(const text *textptr)
Datum LWGEOM_in(PG_FUNCTION_ARGS)
Definition: lwgeom_inout.c:60

Here is the call graph for this function: