How can I know the default style for a layer in Geoserver, and the number of rules it contains, using a REST call or service?


You can request the style using REST (_http://myserver.com/geoserver/styles/mystyle). Once you've got the file use something like

grep '<Rule' mystyle.sld | wc -l 

to count the number of lines.

Obviously you can use any programming language of your choice to automate this.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.