I think I've identified a fairly major problem with the use of ST_Simplify in GeoServer 2.5+/GeoTools 11+.
With the new usage of ST_Simplify, if the map view is zoomed out far enough, the tolerance value passed to ST_Simplify is large enough that small polygons are simplified into nulls, and as a result are completely excluded from the map. This doesn't seem like the intended behavior; when zoomed out, it appears that there's no data where the simplified data should be.
I'm not sure if this is a GeoTools problem or a PostGIS problem. It seems like it should be possible to tell PostGIS to not simplify your geometries into oblivion, but the only option to do so appears to be using ST_SimplifyPreserveTopology which is slow enough to not be viable. Maybe we should lobby Paul Ramsey to add a switch argument to ST_Simplify that would still completely collpased geometries as points instead of nulling them?
I'll add another issue to optionally disable ST_Simplify functionality with a system property, as it seems that others have been running into trouble as well.
Test data and requests illustrating this problem are attached.
|