Hi all,
Following after the recent work to make workspaces in geoserver be able to live truly autonomously, i am back to revisit a topic that was brought up before, and that is storing styles on a workspace by workspace basis. Before I get to far with an implementation I wanted to run some ideas by folks first.
First thing is style visibility. If styles can be stored globally and stored under a workspace, what styles should be visible from where? It would make sense that “global” styles be visible everywhere, whether you are going through a virtual service / workspace or not. But what about non global styles? Should they be constrained only to that workspace / virtual service? Or should you be able to access them globally as well, perhaps with some prefix?
I am thinking the former. To illustrate, here are some examples:
Consider some global styles:
- point
- line
And some local ones:
topp:
- foo
nurc:
- bar
The following requests would all be valid:
geoserver/wms?..&styles=point
geoserver/topp/wms?..&styles=line
geoserver/topp/wms?..&styles=foo
geoserver/nurc/wms?..&styles=bar
The following requests would not be valid:
geoserver/wms?..&styles=foo
geoserver/wms?..&styles=bar
geoserver/topp/wms?..&styles=bar
geoserver/nurc/wms?..&styles=foo
Thoughts?
A second issue i ran into are styles that make use of other resources (like external graphics), that are stored along side the sld file. If we make styles be able to be part of a workspace, this means the style sld file can potentially move around, and for that to work we have to move not only the sld, but any other resources it requires. Currently our config model doesn’t specify any of these files.
One potential solution is to add an additional property to StyleInfo, something like “resourceFilenames”.
StyleInfo {
List getResourceFilenames():
}
Which would store any supplementary files that are needed by the SLD. When the user uploads a new file via the ui, we examine the file and look for any external graphics that point to relative file uris, and detect the additional resources. This might not be bullet proof so I was also thinking of an additional form field (a list chooser with add/remove) that would allow the admin to explicitly specify the supplementary fies.
Thoughts?
Thanks folks. Feedback much appreciated.
-Justin
–
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.