A crude approach I have used in the past is to add an integer attribute to
my points or lines and then to assign a random attribute value from a range
that is based on the density of features in the area.  I then specify in
the SLD that only features greater than some number should be displayed for
particular zoom levels.

For instance,

For your city features, you might assign a random integer attribute to each
of them from a range between, say, 0 and 1000.

For your countryside features, you might assign a random integer attribute
that have a range between 700 and 1000.

Then, say for a zoom level 5 or 6, you might specify in the SLD to only
show features whose attribute > 700.

Doing this, you end up keeping all of the countryside features, but
randomly filtering out city features.

At greater zoom levels ... just say 9, 10, or so (depending on your
situation), you then show features whose attribute > 500, 400, etc.,
thereby allowing more city features to be shown as you zoom in.

I could probably have done some statistics to tell me the exact ranges to
use, but trial & error worked fine for me.

- Mike Grogan





On Wed, Aug 6, 2014 at 5:39 AM, PREVOSTO, Laurent <laurent.prevo...@sfr.com>
wrote:

>  Hello,
>
> We have geoserver based WMS services that display a quite large network
> (lots of points and polylines stored in an Oracle Spatial database).
>
>
>
> When in the cities, the number of items can be very large
>
> In the countryside, of course, the density of polylines is quite low.
>
>
>
> If I try to render  a whole city, since there are too many items to
> render, the request will timeout.
>
> But if I set a scale condition to avoid drawing thousands of lines when in
> a large city, users complain that they can’t find the cables when in the
> countryside…
>
>
>
> So my question was : is there a way to tell geoserver to render a blank
> image if there are more than n items in the Oracle resultset ?
>
> That way, I could keep a large scale in my TLD without going timeout in
> areas where there is a high density of items.
>
>
>
> Regards,
>
>
>
> Laurent
>
>
> ------------------------------------------------------------------------------
> Infragistics Professional
> Build stunning WinForms apps today!
> Reboot your WinForms applications with our WinForms controls.
> Build a bridge from your legacy apps to the future.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to