Hi Damiano,<br><br>Glad to hear that you're getting tiles now. I think that your tilecache.cfg should have the srs defined of the projection that you wish the tiles to be created in. The installation readme for TileCache states that if you don't define an SRS, EPSG:4326 is assumed.<br>
<br>I'm a little confused about whether your problem is a) that the tiles are being generated in the wrong projection, or b) that you are getting too many tiles generated, over a larger extent than you need. For a), I think you need to define your projection, both in MapServer, and in TileCcahe. For b), run <a href="http://tilecache.see.py">tilecache.see.py</a> with the extents defined, like this:<br>
tilecache_seed.py <URL> basic <zoom_start> <zoom_end> "12,41,13,42"<br><br>Good luck.<br><br>Roger<br>--<br><br><div class="gmail_quote">On Sun, Oct 26, 2008 at 2:52 AM, Damiano Morosi <span dir="ltr"><<a href="mailto:damiano.morosi@gmail.com">damiano.morosi@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br><br>thanks, now the tiles are produced well. I still have a problem: it seems that the bbox coordinates are "unprojected", while the tiles are generated "projected". I don't want to produce the world tiles, only for my city (Rome) that can be contained in the 12,14,13,43 long/lat bbox, but the result is slightly different. Why?<br>
<br><div class="gmail_quote">2008/10/25 Roger André <span dir="ltr"><<a href="mailto:randre@gmail.com" target="_blank">randre@gmail.com</a>></span><div><div></div><div class="Wj3C7c"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I think you need to add some parameters to the LAYER METADATA section of your mapfile. Like this:<br><br> METADATA<br> "wms_srs" "EPSG:4326 EPSG:102004 EPSG:900913"<br> "wms_name" "states"<br>
"wms_server_version" "1.1.1"<br> "wms_format" "image/png"<br> "wms_onlineresource" "<a href="http://localhost/cgi-bin/mapserv?map=/var/www/mapfiles/states/states.map&" target="_blank">http://localhost/cgi-bin/mapserv?map=/var/www/mapfiles/states/states.map&</a>"<br>
END<br><font color="#888888">--</font><div><div></div><div><br><br><div class="gmail_quote">On Sat, Oct 25, 2008 at 5:36 AM, Christopher Schmidt <span dir="ltr"><<a href="mailto:crschmidt@metacarta.com" target="_blank">crschmidt@metacarta.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div>On Sat, Oct 25, 2008 at 02:21:38PM +0200, Damiano Morosi wrote:<br>
> Hi all,<br>
><br>
> this is the first time I use Tilecache. I'm trying to generate tiles for a<br>
> Map (that I can visualize successfully in OpenLayers with Mapserver). The<br>
> .map file is as following:<br>
><br>
> ----<br>
><br>
> #<br>
> # Start of map file<br>
> #<br>
> #<br>
> NAME NAVSTREETS<br>
> STATUS ON<br>
> SIZE 600 600<br>
> SYMBOLSET "/var/www/maps/symbols.sym"<br>
> EXTENT 12 41 13 42<br>
><br>
> SHAPEPATH "/var/www/shapes/"<br>
> IMAGETYPE png<br>
> IMAGECOLOR 150 150 150<br>
><br>
> #<br>
> # Start of web interface definition<br>
> #<br>
> WEB<br>
> #MINSCALE 2000000<br>
> #MAXSCALE 50000000<br>
> IMAGEPATH "/tmp/ms_tmp/"<br>
> IMAGEURL "/ms_tmp/"<br>
> METADATA<br>
> "wms_title" "navstreet map"<br>
> "wms_onlineresource" "<a href="http://213.199.15.252/cgi-bin/mapserv?map=ms.map&" target="_blank">http://213.199.15.252/cgi-bin/mapserv?map=ms.map&</a>"<br>
><br>
> END<br>
> TEMPLATE "test.html"<br>
> END<br>
><br>
> # Layers<br>
><br>
> LAYER<br>
> METADATA<br>
> "queryable" "true"<br>
> "wms_title" "GreenA"<br>
> END<br>
><br>
> TEMPLATE "test.html"<br>
><br>
> NAME GreenA<br>
> TYPE POLYGON<br>
> STATUS ON<br>
><br>
> DATA LandUseA<br>
> CLASS<br>
> NAME "Streets"<br>
> OUTLINECOLOR 0 255 0<br>
> COLOR 0 255 0<br>
> END<br>
> END # layer<br>
><br>
> END # MAP<br>
><br>
> ----<br>
><br>
> The following is my tilecache.cfg file:<br>
><br>
> ----<br>
><br>
> [cache]<br>
> base = /tmp/tilecache<br>
> type = Disk<br>
><br>
> [basic]<br>
> layers = GreenA<br>
> spherical_mercator = no<br>
> data_extent = 12,41,13,42<br>
> extension = png<br>
> url = <a href="http://213.199.15.252/cgi-bin/mapserv?map=ms.map" target="_blank">http://213.199.15.252/cgi-bin/mapserv?map=ms.map</a><br>
> metatile = no<br>
> bbox = 12,41,13,42<br>
> type = WMS<br>
><br>
> ----<br>
><br>
> The layer is deriving from a shapefile. Then I try the command:<br>
><br>
> python tilecache_seed.py "<a href="http://213.199.15.252/cgi-bin/tilecache.cgi" target="_blank">http://213.199.15.252/cgi-bin/tilecache.cgi</a>?"<br>
> basic 0 5<br>
><br>
> and I get the error<br>
><br>
> msWMSLoadGetMapParams(): WMS server error. Invalid SRS given : SRS must be<br>
> valid for all requested layers.<br>
><br>
> The point is that I don't want to project my map, so as far as I know, I<br>
> haven't to set a projection object in mapfile. Is it mandatory to fullfill<br>
> the tilecache requisites? How can I produce tiles from map that are usable<br>
> by OpenLayers?<br>
<br>
</div></div>You need to set up your mapfile for WMS.<br>
<br>
<a href="http://mapserver.gis.umn.edu/docs/howto/wms_server" target="_blank">http://mapserver.gis.umn.edu/docs/howto/wms_server</a><br>
<a href="http://mapserver.gis.umn.edu/docs/howto/wms_server/#setup-a-mapfile-for-your-wms" target="_blank">http://mapserver.gis.umn.edu/docs/howto/wms_server/#setup-a-mapfile-for-your-wms</a><br>
<div><br>
> Thank you all,<br>
><br>
> Damiano Morosi<br>
<br>
</div>> _______________________________________________<br>
> Tilecache mailing list<br>
> <a href="mailto:Tilecache@openlayers.org" target="_blank">Tilecache@openlayers.org</a><br>
> <a href="http://openlayers.org/mailman/listinfo/tilecache" target="_blank">http://openlayers.org/mailman/listinfo/tilecache</a><br>
<font color="#888888"><br>
<br>
--<br>
Christopher Schmidt<br>
MetaCarta<br>
_______________________________________________<br>
Tilecache mailing list<br>
<a href="mailto:Tilecache@openlayers.org" target="_blank">Tilecache@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/tilecache" target="_blank">http://openlayers.org/mailman/listinfo/tilecache</a><br>
</font></blockquote></div><br>
</div></div></blockquote></div></div></div><br>
</blockquote></div><br>