Why not using just one GeoServer SQL view with a parameter for your types
and in openlayers a function to generate your layers.

You could even generate a void GeoServer SQL layer with a SELECT DISTINCT
query so you could get your types from a WFS query and make it more
general.

My 2cts
--
Jorge Sanz
http://jorgesanz.net

Sent from my tablet, sorry for my brevity, top posting, etc.
El 25/08/2014 22:19, "Roel De Nijs" <roel.den...@aquafin.be> escribió:

>  Hi list,
>
> We have a SQL Server spatial table node with a node_type column containing
> +-350K records. Currently we have +-15 different types; the records are not 
> equally
> divided (the least common type 300 records vs the most common type 300K
> records). On different (zoom) levels of our map we need to display other
> node types and a user can decide to hide/show a given type.
> In order to meet this requirement the current setup is as follows:
> - A sql server view (based on table node) for each type (viewType1,
> viewType2, viewType3, ..., viewType15)
> - A geoserver layer for each sql server view (layerType1, layerType2,
> layerType3, ..., layerType15)
> - An OpenLayers layer switcher to control all these layers
> This approach works fine and meets all functional requirements.
>
> At this moment we start a redo of our application. And I was wondering if
> this approach (which was already in use before my arrival) could be
> replaced by another alternative. One of the reasons would be: if a change
> of the views is needed (e.g. filter out out-of-use nodes), I need to change
> all 15 views (e.g. adding the same where-clause). If a new node_type is
> added, you'll have to do some (easy, copy/paste) work. I'm a bit of a lazy 
> developer,
> so I'm always looking to do less if possible :-)
> I guess I'm not the 1st one facing such a scenario and just wondering if
> there are other alternatives. Maybe creating a geoserver sql view once and
> publishing this view 15 times, each time with another type? Or creating
> just 1 geoserver sql view with an in-clause and using viewparams to pass
> all visible types in an array (if possible)? And what about performance
> of using a geoserver sql view vs a geoserver layer based on a sql server
> view?
>
>
> Kind regards,
> Roel
>  [image: banner Chap-eau] <http://www.chap-eau.be>
> ------------------------------
>
> *Volg Aquafin op Facebook <https://www.facebook.com/AquafinNV> | Twitter
> <https://twitter.com/aquafinnv> | YouTube
> <http://www.youtube.com/channel/UCk_4P5BJ-MtEEDCkCsR_KqQ?feature=mhee> |
> LinkedIN <http://www.linkedin.com/company/aquafin/products> *
>
> Disclaimer: zie www.aquafin.be   P Denk aan het milieu. Druk deze mail
> niet onnodig af.
>
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to