You are on page 1of 10

WORKSHOP

On
CAPACITY BUILDING ON WEBGIS
(22-26 February, 2011)
OpenGeo Suite- Styler
Stylin
GeoServer can render geospatial data as images and return them or vie!ing in a bro!ser"
#o!ever, geospatial data has no inherent visuali$ation" %hereore additional inormation,
in the orm o a style, needs to be applied to data in order to visuali$e it"
GeoServer uses the Styled &ayer 'escriptor (S&') language to describe geospatial data"
(e !ill be using Styler, a graphical styling tool that comes as part o the )penGeo Suite,
to style layers !ithout the need to hand code S&'"
Styler
*reating S&' iles by hand can be a diicult and time-consuming process" Fortunately,
the )penGeo Suite contains a tool called Styler, !hich is a graphical style editor" (ith
Styler, you can create rule and symboli$ers !ithout ever needing to vie! S&' code"
U!in Styler"
1" &aunch Styler rom the 'ashboard, by clic+ing on L#un$% under Styler"
Salim ,li *entre For )rnithology ,nd -atural #istory (S,*)-), #yderabad
"1
WORKSHOP
On
CAPACITY BUILDING ON WEBGIS
(22-26 February, 2011)
, list o layers !ill be displayed in the let column" .ultiple layers can be vie!ed in styler by
chec+ing multiple bo/es, but only one layer can be styled at one time (denoted by the radio bo/)"
%he bottom let corner holds the &egend, !hich is a list o all the 0ules in the styles o the visible
layer(s)" Finally, the bul+ o the !indo! is ta+en up by the map vie!, !ith all layers visible that
are chec+ed in the &ayers list"
Salim ,li *entre For )rnithology ,nd -atural #istory (S,*)-), #yderabad
"2
WORKSHOP
On
CAPACITY BUILDING ON WEBGIS
(22-26 February, 2011)
Set the rajahmundry_urban_boundary layer or styling by selecting its radio bo/"
Salim ,li *entre For )rnithology ,nd -atural #istory (S,*)-), #yderabad
"1
WORKSHOP
On
CAPACITY BUILDING ON WEBGIS
(22-26 February, 2011)
*lic+ on the single rule in the &egend in the bottom let !indo!" , style editor !ill display"
#ere you can edit the style" *hange the ollo!ing ields li+e ill, stro+e" 2nchec+
ill ield and in stro+e ield change the color to blue !ith style solid option"
Salim ,li *entre For )rnithology ,nd -atural #istory (S,*)-), #yderabad
"3
WORKSHOP
On
CAPACITY BUILDING ON WEBGIS
(22-26 February, 2011)
(hen done, clic+ S#&e" -ote the ne! style"
-ote that !e have changed the e/isting style"
Cre#tin # ne' !tyle
Since as !e have 4ust seen, Styler has over!ritten the e/isting style or a layer, i !e !ant
to create a ne! style, !e need to create it in GeoServer irst"
1" Go the Style! menu in GeoServer"
Salim ,li *entre For )rnithology ,nd -atural #istory (S,*)-), #yderabad
"5
WORKSHOP
On
CAPACITY BUILDING ON WEBGIS
(22-26 February, 2011)
2" *lic+ A(( # ne' !tyle
1" 6n the N#)e ield, enter churches_style"
3" -o! select the drop do!n list under Copy *ro) e+i!tin !tyle" Since Styler !ill
be changing this ne! style, it doesn7t really matter !hat !e select, but to prevent
errors, the style !e copy should match the geometry type (points, lines, polygons)"
6n this case, !e7ll copy points style" *lic+ Copy,,, to copy the style"
*lic+ Su-)it to save this ne! style" 8eore going to styler, in GeoServer, go to 'ata -9 &ayers"
*lic+ on &ayers and clic+ on churches layers to edit it" Go to publishing tab and select
churches:style (the one !hich !e have generated) and save the layer again by clic+ing on Save
button" -o! !e can go bac+ to Styler and ma+e a ne! style as described above"
Salim ,li *entre For )rnithology ,nd -atural #istory (S,*)-), #yderabad
"6
WORKSHOP
On
CAPACITY BUILDING ON WEBGIS
(22-26 February, 2011)
Set the churches layer or styling by selecting its radio bo/"
*lic+ on the A(( Ne' button in the &egend in the bottom let !indo!" , style editor !ill display
and change the style ields as ollo!s"
N#)e; churches:style
Sy)-ol; *ircle
Si.e; 6
/ill $olor; Green
Salim ,li *entre For )rnithology ,nd -atural #istory (S,*)-), #yderabad
"<
WORKSHOP
On
CAPACITY BUILDING ON WEBGIS
(22-26 February, 2011)
Stro0e Style; Solid
Stro0e Color; 8lac+
Salim ,li *entre For )rnithology ,nd -atural #istory (S,*)-), #yderabad
"=
WORKSHOP
On
CAPACITY BUILDING ON WEBGIS
(22-26 February, 2011)
*lic+ on S#&e button" -o! see the changes in the style or the layer"
Salim ,li *entre For )rnithology ,nd -atural #istory (S,*)-), #yderabad
">
WORKSHOP
On
CAPACITY BUILDING ON WEBGIS
(22-26 February, 2011)
%hen select points rule and clic+ on Delete Sele$te( button to remove point style"
Salim ,li *entre For )rnithology ,nd -atural #istory (S,*)-), #yderabad
"10