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

Definition at line 449 of file lwgeom_inout.c.

References LWGEOM_in(), result, and text2cstring().

450 {
451  text *wkt_text = PG_GETARG_TEXT_P(0);
452  char *wkt;
453  Datum result;
454 
455  /* Unwrap the PgSQL text type into a cstring */
456  wkt = text2cstring(wkt_text);
457 
458  /* Now we call over to the geometry_in function */
459  result = DirectFunctionCall1(LWGEOM_in, CStringGetDatum(wkt));
460 
461  /* Return null on null */
462  if ( ! result )
463  PG_RETURN_NULL();
464 
465  PG_RETURN_DATUM(result);
466 }
char ** result
Definition: liblwgeom.h:218
char * text2cstring(const text *textptr)
Datum LWGEOM_in(PG_FUNCTION_ARGS)
Definition: lwgeom_inout.c:48

Here is the call graph for this function: