[postgis-commits] svn - r3062 - trunk/lwgeom
postgis-commits at postgis.refractions.net
postgis-commits at postgis.refractions.net
Fri Oct 3 11:07:18 PDT 2008
Author: pramsey
Date: 2008-10-03 11:07:18 -0700 (Fri, 03 Oct 2008)
New Revision: 3062
Modified:
trunk/lwgeom/lwgeom_geos_c.c
Log:
Some extra debugf's in the prepared geometry code.
Modified: trunk/lwgeom/lwgeom_geos_c.c
===================================================================
--- trunk/lwgeom/lwgeom_geos_c.c 2008-10-03 17:37:42 UTC (rev 3061)
+++ trunk/lwgeom/lwgeom_geos_c.c 2008-10-03 18:07:18 UTC (rev 3062)
@@ -3880,7 +3880,7 @@
pghe->geom = 0;
pghe->prepared_geom = 0;
- LWDEBUG(3, "GetPrepGeomCache: obj NOT in cache");
+ LWDEBUG(3, "GetPrepGeomCache: obj NOT in cache, deleting prepared geometries");
GEOSPreparedGeom_destroy( cache->prepared_geom );
GEOSGeom_destroy( cache->geom );
@@ -3919,6 +3919,8 @@
errorIfGeometryCollection(geom1,geom2);
errorIfSRIDMismatch(pglwgeom_getSRID(geom1), pglwgeom_getSRID(geom2));
+ LWDEBUG(3, "containsPrepared: entered function");
+
/*
* short-circuit: if geom2 bounding box is not completely inside
* geom1 bounding box we can prematurely return FALSE.
@@ -3932,6 +3934,7 @@
PG_RETURN_BOOL(FALSE);
}
+ LWDEBUGF(4, "containsPrepared: calling for prep_cache with key1 = %d", key1);
prep_cache = GetPrepGeomCache( fcinfo, geom1, 0, key1, 0 );
@@ -3940,6 +3943,7 @@
if ( prep_cache && prep_cache->prepared_geom && prep_cache->argnum == 1 )
{
GEOSGeom g = POSTGIS2GEOS(geom2);
+ LWDEBUG(4, "containsPrepared: cache is live, running preparedcontains");
result = GEOSPreparedContains( prep_cache->prepared_geom, g);
GEOSGeom_destroy(g);
}
@@ -3947,6 +3951,7 @@
{
GEOSGeom g1 = POSTGIS2GEOS(geom1);
GEOSGeom g2 = POSTGIS2GEOS(geom2);
+ LWDEBUG(4, "containsPrepared: cache is not ready, running standard contains");
result = GEOSContains( g1, g2);
GEOSGeom_destroy(g1);
GEOSGeom_destroy(g2);
More information about the postgis-commits
mailing list