I am using GeoServer and the embedded GWC (along with gmaps service) to create tiles (both pre-seeded and dynamic) for a large number of features for a Google Maps tiled overlay.
I have about 175,000 point features over a small regional area, approximately 250,000 km^2 in area.
My data are in postgis/postgres and my layer is configured as a SQL view.
When zoomed in significantly, I need to display all of the point data at the zoom level … but when zoomed out (larger scales), I am fine only showing a representative subset of the data, not all point features.
I can and have setup an SLD that makes sure my features drawn don’t overlap. However, throwing 175,000 points at that SLD obviously takes GeoServer a very long time to sort through.
So, my question is, what is the best method for preventing GeoServer from having to deal with that many points at lower numbered zoom levels (say 0 through 12)?
Is there anything I can do in the SLD so that not so many points are returned … so that GeoServer just ignores a certain number of points at certain zoom levels and doesn’t even have to deal with them (as far as overlaps, label overlaps, etc.)?
I know I can filter by scale denominator in the SLD, but wouldn’t GeoServer still have to deal with all 175,000 points coming back from the database?
Ideally, I would like to be able to alter my SQL view based on the scale denominator, but some previous discussions I have read say there is no way to get the scale denominator into the SQL view (http://osgeo-org.1560.x6.nabble.com/SQL-View-Layer-Parameters-td5027513.html).
My request here is similar to that in http://gis.stackexchange.com/questions/42710/geoserver-show-random-subset-of-features
but as I am using zoom levels basically 2 through 18, the solution presented there (separate layers for each zoom level) is extremely inefficient.
Any and all advice appreciated.
Thanks,
Mike Grogan