Andrea Cappugi ha scritto:
> Hi all,
> I'm developing a restlet service to manage sld, I would like to share
> with community (ideas and code).
> The idea is to develop a geoserver community module ables to serve an
> sld userStyle in a retfull way, (divided in multiple resource):
> Example:
>
http://domain:8080/geoserver/sldservice/{featureType}
> -> List of available styles in geoserver for a featuretype or coverage
> name link to resource
>
http://domain:8080/geoserver/sldservice/{featureType}/{UserStyleID}
> -> UserStyle: Name Title Abstract IsDefault List of FeatureTypeStyle
> (only name, id and link to the resource)
>
http://domain:8080/geoserver/sldservice/{featureType}/{UserStyleID}/{FeatureTypeStyleID}
> -> FeatureTypeStyle Name Title Abstract featureTypeName ruleslength
>
http://domain:8080/geoserver/sldservice/{featureType}/{UserStyleID}/{FeatureTypeStyleID}/rules/
>
http://domain:8080/geoserver/sldservice/{featureType}/{UserStyleID}/{FeatureTypeStyleID}/rules/{fisrtRuleId}/{lastRuleID}
> -> Rule list: As in sld spec. (using the first will return all rules)
> A live example is available at
>
http://test.ominiverdi.org:8080/geoserverSld/sldservice/topp:states (try
> also with other layers)
>
> I will add also the capabilities to generate rules based on
> classification system
> example:
>
http://domain:8080/geoserver/sldservice/{featureType}/{UserStyleID}/{FeatureTypeStyleID}/quantileclassification/{property}/{classNum}
> -> Rule list generated server side
> (not yet added in the live example)
>
> Later I wish to develop a javascript sld editor,
> ables to work with a great number of rules and to create classified style.
> Any comments and ideas are welcome!
Hi Andrea,
first of all, sorry for the very very late answer.
The idea of serving SLD piece wise to a javascript client seems
interesting, and the implementation you're proposing is ok. I see
a few issues thought:
* a client might want to grab a full subtree without having to
do 50 calls. If the SLD is big, there is a trade off between
the amount of data you can deal with in a javascrict client,
and the amount of network delay one has to pay for each call.
I'd suggest to stop the splitting at the rule level, and
to allow full download on the upper levels by using a parameter
(for example, &content=full)
* the idea of having services generate resources server side
seems fine, thought the url does not look right to me. Given
that you're calling an algorithm, the url should be something
like:
http://domain:8080/geoserver/sldservice/{featureType}/{UserStyleID}/{FeatureTypeStyleID}?quantileclassification&property={property}&classNum={num}
I'm also not sure about the type of method, but since it's
creating resources I guess it should be a POST
* the split does work well on the read side, but seems to
fall on the write side. When you create an SLD server side
it must be valid, not an incomplete document.
So I'd say writing wise:
* the creation of a new sld is a put or a post that specifies
a valid SLD
* each item can be modified using PUT
* new elements can be added dynamically using either POST or PUT,
but each time this occurs the element must be complete and valid
(think adding a rule or a feature type style)
What do you think?
Cheers
Andrea
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@...
https://lists.sourceforge.net/lists/listinfo/geoserver-devel