<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thank you Lars, <br>
I will follow your approach. I hope I won't run out of disk space :)<br>
<br>
<br>
Lars Lingner wrote:
<blockquote cite="mid:4ACB21F9.4030107@lingner.eu" type="cite">
<pre wrap="">Adrian Popa schrieb:
</pre>
<blockquote type="cite">
<pre wrap="">Hello everyone,
I have some mapserver layers that I would like to generate into tiles
(because the content doesn't change much). I would like to find out the
following:
1) a link to a tutorial or help on how to do this (which tools to use)
</pre>
</blockquote>
<pre wrap=""><!---->
You could use TileCache. It comes with an tilecache_seed.py script which
generates the tiles queering MapServer.
A sample config can look like:
- MapServer layer
LAYER
TYPE POLYGON
STATUS ON
NAME "landuse"
CONNECTIONTYPE POSTGIS
CONNECTION "host=<host> port=<port> dbname=<dbname> user=<dbuser>
password=<dbpasswd>"
DATA "way from (select way,id ,landuse from otg_polygon where
landuse is not null ) as foo using unique id using srid=900913"
PROCESSING "LABEL_NO_CLIP=ON"
PROCESSING "CLOSE_CONNECTION=DEFER"
CLASSITEM "landuse"
METADATA
WMS_TITLE "landuse"
WMS_GROUP_TITLE "landuse"
WMS_EXTENT "-3654301.4476046 3830412.5307382 6971056.978358
9730128.1208444"
WMS_ABSTRACT "layer landuse"
END #metadata
CLASS
STYLE
COLOR "#E3E2DF"
END
END
END
- corresponding TileCache config
[landuse]
type=WMS
url=<a class="moz-txt-link-freetext" href="http://example.org/cgi-bin/mapserv?map=/path/to/mapfile.map">http://example.org/cgi-bin/mapserv?map=/path/to/mapfile.map</a>
layers=landuse
extension=png
bbox=-3654301.4476046,3830412.5307382,6971056.978358,9730128.1208444
maxResolution=9783.93961875
srs=EPSG:900913
metaTile=true
metaSize=8,8
You have to adjust the extents, resolutions, srs, url to your needs
Have a look at TileCache docs for further explanation. (<a class="moz-txt-link-abbreviated" href="http://www.tilecache.org">www.tilecache.org</a>)
</pre>
<blockquote type="cite">
<pre wrap="">2) how can I calculate an estimate of the size those tiles would occupy
</pre>
</blockquote>
<pre wrap=""><!---->
I have no formula at hand.
</pre>
<blockquote type="cite">
<pre wrap="">3) what naming convention (or extra details) are needed to make the
tiles viewable in OpenLayers.
</pre>
</blockquote>
<pre wrap=""><!---->
Either you are using TileCache or you can direct access the cache
directory via an OpenLayers.Layer.TileCache so you don't have to bother
with naming.
Lars
_______________________________________________
mapserver-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</pre>
</blockquote>
<br>
<br>
</body>
</html>