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.

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
add comment

2 Answers 2

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
add comment

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
add comment

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.