2486 GEOSGeometry *g1, *g2;
2489 int bnr = GEOSRELATE_BNR_OGC;
2492 geom1 = PG_GETARG_GSERIALIZED_P(0);
2493 geom2 = PG_GETARG_GSERIALIZED_P(1);
2496 if ( PG_NARGS() > 2 )
2497 bnr = PG_GETARG_INT32(2);
2507 GEOSGeom_destroy(g1);
2511 POSTGIS_DEBUG(3,
"constructed geometries ");
2513 POSTGIS_DEBUGF(3,
"%s", GEOSGeomToWKT(g1));
2514 POSTGIS_DEBUGF(3,
"%s", GEOSGeomToWKT(g2));
2516 relate_str = GEOSRelateBoundaryNodeRule(g1, g2, bnr);
2518 GEOSGeom_destroy(g1);
2519 GEOSGeom_destroy(g2);
2523 result = cstring_to_text(relate_str);
2524 GEOSFree(relate_str);
2526 PG_FREE_IF_COPY(geom1, 0);
2527 PG_FREE_IF_COPY(geom2, 1);
2529 PG_RETURN_TEXT_P(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)