You are on page 1of 4

WORKSHOP

On
CAPACITY BUILDING ON WEBGIS
(22-26 February, 2011)
OpenGeo Suite-GeoWebCace
Like GeoServer, GeoWebCache is a protocol ate!ay" #t sits bet!ee$ tile% &appi$
co&po$e$ts (like 'pe$Layers, Goole (aps a$% (icroso)t *irtual +arth) a$% the
re$%eri$ e$i$e i$ GeoServer" #t,s the secret i$re%ie$t that !ill &ake our &ap )ast"
!ap Cacin"
(ap cachi$ is a very e))ective !ay to &ake your &aps ru$ )aster" Whe$ you create a
&ap cache, the server (e"", GeoWebCache) %ra!s the e$tire &ap at several %i))ere$t
scales, a$% stores copies o) the &ap i&aes" -he server ca$ the$ %istribute these i&aes
!he$ever so&eo$e asks )or a &ap" #t is &uch .uicker )or GeoWebCache to ha$% out a
cache% i&ae tha$ )or GeoServer to %ra! the &ap each ti&e a clie$t re.uests it"
See#in" a !ap Cace
A $ap cace %ep%e&ent& a &nap&ot o' (ou% $ap at one point in ti$e) /ecause o) this,
caches !ork best !ith &aps that %o $ot cha$e )re.ue$tly" -here are t!o !ays to create
cache tiles"
'$e !ay is to pre-create tiles so that they !ill be available !he$ the )irst users start
$aviati$ the &ap" -his process is calle% see%i$"
0 seco$% !ay is to create tiles o$ %e&a$%, &ea$i$ that tiles )or a$ area !ill $ot be
create% u$til the &ap is vie!e%" -he )irst ti&e you $aviate to a$ u$cache% area, you
&ust !ait !hile the correspo$%i$ tiles are %ra!$" -he tiles are the$ a%%e% to the cache
)ol%er a$% re&ai$ o$ GeoServer u$til they are up%ate% or %elete%" -his &ea$s that )or
subse.ue$t visits to the sa&e area, you !ill $ot have to !ait )or a tile to be re$%ere%"
Whether the tiles are pre-create% or o$-%e&a$%, there are t!o steps to creati$ a$y &ap
cache1
1" Set cache properties"
2" Create tiles"
Settin" Cace P%ope%tie&
Let,s set the cache properties o) our tili$ sche&a )or our
%a*a$un#%(+u%ban+boun#a%( &ap"
-o start, let,s ope$ GeoWebCache" 2ust o to the GeoWebCache co$)iuratio$ pae )ro&
the Da&boa%#" +lse you ca$ o %irectly to http133localhost140403eoserver3!c"
Sali& 0li Ce$tre For 'r$itholoy 0$% 5atural 6istory (S0C'5), 6y%eraba%"
1
WORKSHOP
On
CAPACITY BUILDING ON WEBGIS
(22-26 February, 2011)
Li$ki$ to GeoWebCache )ro& the 7ashboar%
Welco&e to GeoWebCache8
Sali& 0li Ce$tre For 'r$itholoy 0$% 5atural 6istory (S0C'5), 6y%eraba%"
2
WORKSHOP
On
CAPACITY BUILDING ON WEBGIS
(22-26 February, 2011)
Locate our %a*a$un#%(+u%ban+boun#a%( layer, a$% click See# ti& ,a(e%"
'$ this pae, !e set our tili$ sche&a, i$clu%i$ the scale levels, tile bou$%aries, a$% i&ae
)or&at )or our %a*a$un#%(+u%ban+boun#a%( cache"
Nu$be% o' t%ea#&1 -his shoul% $ot be set a$y hiher tha$ the $u&ber o) cores o$ your
GeoServer bo9, so that you %o$,t bo %o!$ the server !ith too &uch loa%" #) you,re !orki$
locally, leave the $u&ber o) threa%s at -"
T(pe o' ope%ation1 Leave this as Re&ee#" : ;esee%, e$erates all the tiles i$ the
area o) i$terest" : See%, )ills i$ the aps !here tiles %o$,t alrea%y e9ist (because
they !ere %e&a$% e$erate% alrea%y)" : -ru$cate, e&pties the cache" -his is
use)ul !he$ the %ata has cha$e% so the &ap $ee%s to be up%ate%"
SRS1 /ecause tiles are re$%ere%, you $ee% to choose !hich S;S to re$%er the&
i$to"
.o%$at1 -his setti$ %eter&i$es !hat output i&ae )or&at the &ap service !ill
use !he$ it creates the tiles" <our choice o) i&ae )or&at is i&porta$t because it
%eter&i$es the si=e o$ %isk o) the tiles, the i&ae .uality, a$% the ability to &ake
the tile backrou$% tra$spare$t" -his ca$ be le)t as i$a"e/pn""
0oo$ &ta%t1 -he top =oo& level, e$erally see%i$ everythi$ )ro& the hihest
=oo& level %o!$ is a oo% i%ea" Leave this at 11"
0oo$ &top1 -he lo!est =oo& level" -he )arther %o!$ you %o, the lo$er the
process takes" Leave this at 12
Boun#in" bo31 0s $ote% above, you ca$ choose to o$ly pre-create o$ly a portio$
o) your total area" We !ill see% t see the e$tire area, leave these )iel%s bla$k"
<our )i$al properties shoul% look like1
Nu$be% o' t%ea#&1 1
T(pe o' ope%ation1 Reseed
G%i# Set1 4326
.o%$at1 png
0oo$ Sta%t1 0
0oo$ Stop1 08
Boun#in" Bo31 empty
Sali& 0li Ce$tre For 'r$itholoy 0$% 5atural 6istory (S0C'5), 6y%eraba%"
>
WORKSHOP
On
CAPACITY BUILDING ON WEBGIS
(22-26 February, 2011)
-he Sub$it butto$ )ires o)) the see%i$ process" <our co&puter !ill ri$% )or a !hile as
all the tiles are e$erate% a$% place% i$ the cache"
Click Re'%e& Li&t to see the cou$t %o!$ )or esti&ate% ti&e re&ai$i$" Whe$ the layer is )ully
cache%, you !ill be re%irecte% to the properties pae"
-his !ill create the pre-cache% i&aes i$ the GWC %irectory o) GeoServer %ata %irectory a$%
$o! previe! your ra?ah&u$%ry@irba$@bou$%ary layer a$% you !ill $otice that re$%eri$ o) the
layer is &uch )aster"
Well %o$e888 <ou have lear$e% ho! to cache the GeoServer layer"
Sali& 0li Ce$tre For 'r$itholoy 0$% 5atural 6istory (S0C'5), 6y%eraba%"
A

You might also like