This seems to me to be a very good case for the use of views. You would be able to keep the features in a single table (as befits their status as features of a common type) but be able to distinguish them on the basis of your discriminator column, and you'd be letting the database do that work. It's probably going to be faster than GeoServer, as Justin says.
Is there a particular reason you require to do this in the symbolization layer?
---
A. Soroka ; Digital Scholarship Services R & D ; the University of Virginia Library
On Dec 1, 2008, at 1:04 PM, AJ R wrote:
Hi Justin
Yes I have done pretty much the same thing - an individual SLD for each layer with a Filter, I create FeatureType - one for each layer with the same table name, but different aliases.
But something weird happens with geoserver. I am able to do this and "Apply" in the geoserver admin. But when i try to persist it using "Save", it does not persist all the layers, so essentially i have all the layers, as long as my geoserver is up and running, but when it goes down and has to be restarted, all my layers are gone and i have to recreate them all from scratch.
The issue that I could figure out is that when geoserver persists the featureTypes, it uses the name as the key value, and the name will always be the "table name", so essentially there can be only one entry that will be persisted with the "table name" key. So right now the only way out for me is to modify geoserver code.
Any ideas??
Thanks & Regards
Ajay Ravichandran
On Thu, Nov 27, 2008 at 6:33 PM, Justin Deoliveira <jdeolive@anonymised.com> wrote:
Hi Ajay,
Assuming the value of the discriminator column has n different values:
1. Create an SLD which n rules in it. Each rule specifies a filter which matches a particular value of the distriminator column.
2. Add the table (i assume it is a table) n times to geoserver as feature types, each time setting the above SLD style as the default style.
Hope that helps. In terms of efficiency views would be more efficient. Also (and I might be wrong here) creating n SLD's instead of 1 will probably be faster too.
-Justin
ajayr wrote:
Hi
I am using geoserver to setup the layers to be rendered. I have a situation
where i have multiple layers that need to be rendered, all from a single
table differentiated by a discriminator column. Any ideas how I can create
my feature types in teh feature type editor in such a situation? Using views
is of course one option, but due to the sheer number of views that could
possibly be created this is possibly out of the question.
Any ideas/help will be appreciated
Thanks & Regards
Ajay Ravichandran
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users