Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

You can request the style using REST (_ 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


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.