Quoting Martin Davis <mbdavis@VividSolutions.com>:

> GEOS provides the geometryChanged() method to indicate to a Geometry that it
> should refresh its internal caches since it's coordinates might have changed.
> 
> Simply calling isValid will also update the cache.

I think strk is probably referring to the postgis cache of validity, as opposed 
to the geos cache - remember, the geos object is going to disappear as soon as 
the spatial operation is complete.

The postGIS isValid() cache would have to be automatically updated upon updates 
to the geometry.

Here is another possibility for dealing with valid geometries - it should be 
possible to set a constraint of isValid() on any geometry column, without even 
changing postgis at all (assuming the isValid() function exists). Before 
running a spatial operator, postgis could check if the geometry is from a 
column with that constraint, and if it isn't then it can run isValid on it.

This may be the best option, as it is unlikely that you want to mix valid 
geometries with invalid ones in the same column - this constraint would allow 
you to control that, and then postGIS can simply take advantage of that 
constraint.

Chris





