2433 GEOSGeometry *g1, *g2;
2436 geom1 = PG_GETARG_GSERIALIZED_P(0);
2437 geom2 = PG_GETARG_GSERIALIZED_P(1);
2450 GEOSGeom_destroy(g1);
2454 patt = DatumGetCString(DirectFunctionCall1(textout,
2455 PointerGetDatum(PG_GETARG_DATUM(2))));
2460 for ( i = 0; i < strlen(patt); i++ )
2462 if ( patt[i] ==
't' ) patt[i] =
'T';
2463 if ( patt[i] ==
'f' ) patt[i] =
'F';
2466 result = GEOSRelatePattern(g1,g2,patt);
2467 GEOSGeom_destroy(g1);
2468 GEOSGeom_destroy(g2);
2473 PG_FREE_IF_COPY(geom1, 0);
2474 PG_FREE_IF_COPY(geom2, 1);
2476 PG_RETURN_BOOL(result);
void gserialized_error_if_srid_mismatch(const GSERIALIZED *g1, const GSERIALIZED *g2, const char *funcname)
void lwgeom_geos_error(const char *fmt,...)
#define HANDLE_GEOS_ERROR(label)
GEOSGeometry * POSTGIS2GEOS(GSERIALIZED *pglwgeom)