Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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? Thank you bye stefano

share|improve this question

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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