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

I have a shapefile data of buildings. I added it to GeoServer and serve it as a WMS layer. When I check my own maps in the browser my polygons of building appear black color and I want to change it's color.

What am I supposed to do ??

share|improve this question
up vote 5 down vote accepted

Geoserver layers have associated styles. These styles are written in Styled Layer Descriptor (SLD), a subset of XML. To change your styles, you'll have to edit the SLD. In Geoserver, the SLD can be edited using the Style Editor in the Styles Page.

enter image description here

Pretty ain't it? Fortunately, you don't have to edit the Styles by hand. A workaround is to use a GIS package like uDig to style the layers using a GUI. Just load the shapefile in uDig and style as desired. Once you're satisfied, you can export the SLD and upload it to Geoserver. Or you can load open it on a text editor and then copy paste the contents into Geoserver's Style Editor.

Hopefully that should be enough to get you started. If you really want to get your hands dirty though, you might want to check out the SLD Cookbook. It should give you an idea of how to change the SLD by hand. Good luck.

share|improve this answer
thank you! it was work ;) – ankaGeo Feb 21 '13 at 10:37
Glad be of help. :) You might want to accept the answer by clicking the check mark ;-) – R.K. Feb 21 '13 at 15:12

It looks like you are using GeoServer for publish your data. See official GeoServer docs. There is very helpful Introduction to GeoServer workshop from OpenGeo especially Styling section in your case.

share|improve this answer
thanks a lot ;) – ankaGeo Dec 22 '12 at 13:29

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.