PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ ST_RelateMatch()

Datum ST_RelateMatch ( PG_FUNCTION_ARGS  )

Definition at line 42 of file lwgeom_geos_relatematch.c.

43 {
44  char *mat, *pat;
45  text *mat_text, *pat_text;
46  int result;
47 
48  /* Read the arguments */
49  mat_text = (PG_GETARG_TEXT_P(0));
50  pat_text = (PG_GETARG_TEXT_P(1));
51 
52  /* Convert from text to cstring */
53  mat = text_to_cstring(mat_text);
54  pat = text_to_cstring(pat_text);
55 
56  initGEOS(lwpgnotice, lwgeom_geos_error);
57 
58  result = GEOSRelatePatternMatch(mat, pat);
59  if (result == 2)
60  {
61  lwfree(mat); lwfree(pat);
62  lwpgerror("GEOSRelatePatternMatch: %s", lwgeom_geos_errmsg);
63  PG_RETURN_NULL();
64  }
65 
66  lwfree(mat); lwfree(pat);
67  PG_RETURN_BOOL(result);
68 }
char lwgeom_geos_errmsg[LWGEOM_GEOS_ERRMSG_MAXSIZE]
void lwgeom_geos_error(const char *fmt,...)
void lwfree(void *mem)
Definition: lwutil.c:244
char * text_to_cstring(const text *textptr)

References lwfree(), lwgeom_geos_errmsg, lwgeom_geos_error(), and text_to_cstring().

Here is the call graph for this function: