[Tilecache] Tile seeding hardly slow down after projection

Dane Springmeyer blake at hailmail.net
Fri Nov 28 14:17:32 EST 2008


Hello Damiano,

My first guess would be that Mapnik is attempting to reproject the  
data, not TileCache.

Make sure that the proj.4 string literal you are using to specify the  
projection of your layers and the map in the Mapnik XML mapfile are  
exactly the same otherwise Mapnik will attempt to reproject internally.

It is easy to miss specifying the projection for a layer in the XML  
and Mapnik will assume the proj literal of '+proj=latlong  
+datum=WGS84' for all layers unless specified.

Also, I noticed that you are using the SRS= <proj literal> syntax in  
your tilecache config.  You can probably drop that because it won't  
affect the Mapnik TileCache Layer.  If you truly want to reproject  
your data when using a Mapnik TileCache Layer then you would do:

projection = <proj literal>

Dane

On Nov 28, 2008, at 10:50 AM, Damiano Morosi wrote:

> Hi,
>
> I was using the following configuration for tilecache:
>
> --
>
> [cache]
> base = /tmp/tilecache
> type = Disk
>
> [basic]
> type=Mapnik
> mapfile=/var/www/mapfile.xml
> srs = EPSG:4326
>
> #---------------------#
> # Impostazione regione#
> #---------------------#
>
> bbox = 9.7,39.7,15.3,45.3
> size=600, 600
> resolutions =  
> 0.0093333330,0.0046666665,0.0023333332,0.0011666666,0.0005833333,0.0002916667,0.0001458333,0.0000729167,0.0000364583,0.0000182292,0.0000091146
>
> --
>
> Now, I've projected all the shapes with ogr2ogr using with the  
> following:
>
> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0  
> +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs
>
> that should be the projection used by Google.
> So I changed the tilecache config:
>
> --
>
> [cache]
> base = /tmp/tilecache-proj
> type = Disk
>
> [basic]
> type=Mapnik
> mapfile=/var/www/mapfile-proj.xml
> srs = +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0  
> +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs
>
> #---------------------#
> # Impostazione regione#
> #---------------------#
> bbox = 1079799,4936842,1703799,5560842
> size=600, 600
> resolutions =  
> 1040.0000000000,520.0000000000,260.0000000000,130.0000000000,65.0000000000,32.5000000000,16.2500000000,8.1250000000,4.0625000000,2.0312500000,1.0156250000
>
> --
>
> and, of course, the mapnik mapfile. Now the tilecache_seed.py is  
> taking about 0.9 seconds for generating a single tile, while before  
> this modification the time required was about 0.02 s. All the shapes  
> are indexed with shapeindex on 64 levels. It's possible that a  
> change in the projection cause such a dramatical performances  
> decrease? Or maybe tilecache is trying to "reproject" something?
>
> Thank you all,
>
> Damiano
> _______________________________________________
> Tilecache mailing list
> Tilecache at openlayers.org
> http://openlayers.org/mailman/listinfo/tilecache

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/tilecache/attachments/20081128/fcb35806/attachment.html


More information about the Tilecache mailing list