unlike FeatureTypes, styles are styles, there's no metadata. the only thing that notates the fact that a given style exists is one entry in the catalog.xml file, where the name of the style is ALWAYS the name of the SLD file, sans .sld prefix. as such, i think that when a .sld file exists in the styles directory, it should automatically be taken to exist as a usable style.
my thinking comes from my current hacked up and awkward but beautiful use of GeoServer to create real dynamic data maps (eg: http://transit.frumin.net/trx/maps/subway-orig.png). In order to create lots of different GIS queries, one needs to create a lot of SLD files with different sets of rules/ranges/etc. having to always go into the GeoServer admin to add a style is untenable.
note: it is possible to programatically add a featuretype/layer at this point, by adding to the featureTypes directory. but not so with styles, w/out also adding the extra-silly <styles> area of the catalog.xml file, and can't really be done atomically if the running app is also using/editing that file.
thanks,
mike
Yeah, I've felt this for awhile. Indeed I was naive when we ported gt2wms to GeoServer, and assumed there was some good reason that the catalog had to reference. Later I found there wasn't. So yeah, could you add this to JIRA? We'll try to prioritize it soon.
Chris
Michael Frumin wrote:
unlike FeatureTypes, styles are styles, there's no metadata. the only thing that notates the fact that a given style exists is one entry in the catalog.xml file, where the name of the style is ALWAYS the name of the SLD file, sans .sld prefix. as such, i think that when a .sld file exists in the styles directory, it should automatically be taken to exist as a usable style.
my thinking comes from my current hacked up and awkward but beautiful use of GeoServer to create real dynamic data maps (eg: http://transit.frumin.net/trx/maps/subway-orig.png). In order to create lots of different GIS queries, one needs to create a lot of SLD files with different sets of rules/ranges/etc. having to always go into the GeoServer admin to add a style is untenable.
note: it is possible to programatically add a featuretype/layer at this point, by adding to the featureTypes directory. but not so with styles, w/out also adding the extra-silly <styles> area of the catalog.xml file, and can't really be done atomically if the running app is also using/editing that file.
thanks,
mike
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
!DSPAM:4005,4679a1c3214461849620573!
--
Chris Holmes
The Open Planning Project
http://topp.openplans.org
On 6/20/07, Michael Frumin <mfrumin@anonymised.com> wrote:
unlike FeatureTypes, styles are styles, there's no metadata. the only
thing that notates the fact that a given style exists is one entry in
the catalog.xml file, where the name of the style is ALWAYS the name of
the SLD file, sans .sld prefix. as such, i think that when a .sld file
exists in the styles directory, it should automatically be taken to
exist as a usable style.
my thinking comes from my current hacked up and awkward but beautiful
use of GeoServer to create real dynamic data maps (eg:
http://transit.frumin.net/trx/maps/subway-orig.png). In order to create
lots of different GIS queries, one needs to create a lot of SLD files
with different sets of rules/ranges/etc. having to always go into the
GeoServer admin to add a style is untenable.
note: it is possible to programatically add a featuretype/layer at this
point, by adding to the featureTypes directory. but not so with styles,
w/out also adding the extra-silly <styles> area of the catalog.xml file,
and can't really be done atomically if the running app is also
using/editing that file.
thanks,
mike
It is also possible to specify the url to an SLD document:
http://communitymapbuilder.org/display/GEOSDOC/WMS
Not that automatically updating styles in the catalog is unnecessary,
I am just posting this so people are aware of the possibilities.
Alex