[Tilecache] Problem with spherical mercator at one zoom level

Bjørn Sandvik bjorn at thematicmapping.org
Sun Jan 17 14:47:29 EST 2010


Thanks for the clarification. I removed "spherical_mercator=true" and
added "bbox=-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892"
in tilecache.cfg, and now it seems to work!

Thanks,
Bjørn

http://blog.thematicmapping.org


2010/1/17 Josh Livni <josh at umbrellaconsulting.com>:
> Tilecache doesn't really know any details about different projections.  If
> you tell it to render -360 to -50 in epsg:4326, it will try give that a
> shot.  Different rendering engines might treat this request differently.
>  I'd suggest trying these requests tilecache is making to your wms (mapnik?)
> and seeing how it responds.
> Note that with certain seed parameters, tilecache will try to pad the extent
> you requested, even if that padding goes outside of the definition of what
> the projection technically covers....
>  -Josh
>
>
> 2010/1/17 Bjørn Sandvik <bjorn at thematicmapping.org>
>>
>> Hi,
>>
>> These are the tile bounds calculated by TileCache when pre-generating
>> map tiles for zoom level 0 and 1 (world map, spherical mercator):
>>
>> C:\Python25\python.exe tilecache_seed.py country_labels2 0 2 -f
>>
>> ###### (0, 0, 0), (1, 1, 0)
>>
>> Cache miss: -20037508.34,-20037508.34,20037508.3384,20037508.3384,
>> Tile: x: 0, y : 0, z: 0, time: 0.177000045776
>> 00 (000000, 000000) = (-20037508.3400 -20037508.3400 20037508.3384
>> 20037508.3384) [0.1810s : 5.461/s] 1/1
>>
>> Cache miss: 20037508.3384,-20037508.34,60112525.0168,20037508.3384,
>> Tile: x: 1, y: 0, z: 0, time: 0.0149998664856
>> 00 (000001, 000000) = (20037508.3384 -20037508.3400 60112525.0168
>> 20037508.3384) [0.0160s : 9.896/s] 2/1
>>
>> Cache miss: -20037508.34,20037508.3384,20037508.3384,60112525.0168,
>> Tile: x: 0, y: 1, z: 0, time: 0.0150001049042
>> 00 (000000, 000001) = (-20037508.3400 20037508.3384 20037508.3384
>> 60112525.0168) [0.0170s : 13.447/s] 3/1
>>
>> Cache miss: 20037508.3384,20037508.3384,60112525.0168,60112525.0168,
>> Tile: x: 1, y: 1, z: 0, time: 0.0130000114441
>> 00 (000001, 000001) = (20037508.3384 20037508.3384 60112525.0168
>> 60112525.0168) [0.0150s : 16.591/s] 4/1
>>
>> ###### (0, 0, 1), (2, 2, 1)
>>
>> Cache miss:
>> -20037508.34,-20037508.34,-0.000799998641014,-0.000799998641014,
>> Tile: x: 0, y: 0, z: 1, time: 0.0699999332428
>> 01 (000000, 000000) = (-20037508.3400 -20037508.3400 -0.0008 -0.0008)
>> [0.0710s : 15.918/s] 1/4
>>
>> Cache miss:
>> -0.000799998641014,-20037508.34,20037508.3384,-0.000799998641014,
>> Tile: x: 1, y: 0, z: 1, time: 0.0680000782013
>> 01 (000001, 000000) = (-0.0008 -20037508.3400 20037508.3384 -0.0008)
>> [0.0700s : 15.580/s] 2/4
>>
>> Cache miss: 20037508.3384,-20037508.34,40075016.6776,-0.000799998641014,
>> Tile: x: 2, y: 0, z: 1, time: 0.00799989700317
>> 01 (000002, 000000) = (20037508.3384 -20037508.3400 40075016.6776
>> -0.0008) [0.0090s : 17.717/s] 3/4
>>
>> Cache miss:
>> -20037508.34,-0.000799998641014,-0.000799998641014,20037508.3384,
>> Tile: x: 0, y: 1, z: 1, time: 0.0639998912811
>> 01 (000000, 000001) = (-20037508.3400 -0.0008 -0.0008 20037508.3384)
>> [0.0660s : 17.275/s] 4/4
>>
>> Cache miss:
>> -0.000799998641014,-0.000799998641014,20037508.3384,20037508.3384,
>> Tile: x: 1, y: 1, z: 1, time: 0.0739998817444
>> 01 (000001, 000001) = (-0.0008 -0.0008 20037508.3384 20037508.3384)
>> [0.0750s : 16.664/s] 5/4
>>
>> Cache miss: 20037508.3384,-0.000799998641014,40075016.6776,20037508.3384,
>> Tile: x: 2, y: 1, z: 1, time: 0.00800013542175
>> 01 (000002, 000001) = (20037508.3384 -0.0008 40075016.6776
>> 20037508.3384) [0.0100s : 18.113/s] 6/4
>>
>> Cache miss: -20037508.34,20037508.3384,-0.000799998641014,40075016.6776,
>> Tile: x: 0, y: 2, z: 1, time: 0.00899982452393
>> 01 (000000, 000002) = (-20037508.3400 20037508.3384 -0.0008
>> 40075016.6776) [0.0100s : 19.500/s] 7/4
>>
>> Cache miss: -0.000799998641014,20037508.3384,20037508.3384,40075016.6776,
>> Tile:x: 1, y: 2, z: 1, time: 0.00799989700317
>> 01 (000001, 000002) = (-0.0008 20037508.3384 20037508.3384
>> 40075016.6776) [0.0100s : 20.794/s] 8/4
>>
>> Cache miss: 20037508.3384,20037508.3384,40075016.6776,40075016.6776,
>> Tile: x: 2, y: 2, z: 1, time: 0.00999999046326
>> 01 (000002, 000002) = (20037508.3384 20037508.3384 40075016.6776
>> 40075016.6776) [0.0110s : 22.030/s] 9/4
>>
>> ----------------------------------------
>>
>> Why are several of these tiles out of bounds defined by spherical
>> mercator (-20037508.34, -20037508.34, 20037508.34, 20037508.34). I've
>> made a Google Spreadsheet showing the mismatch:
>>
>> http://spreadsheets.google.com/pub?key=tBo1PLS1uldW01SgSv3se8A&single=true&gid=0&output=html
>>
>> [country_labels2]
>> type=Mapnik
>> mapfile=C:\EarthAtlas\maps\merc_country_labels2.xml
>> spherical_mercator=true
>>
>> Cheers,
>> Bjørn
>>
>> http://blog.thematicmapping.org
>>
>>
>>
>> 2010/1/16 Bjørn Sandvik <bjorn at thematicmapping.org>:
>> > Cross-posting from Mapnik-users:
>> > https://lists.berlios.de/pipermail/mapnik-users/2010-January/002824.html
>> >
>> > I'm experiencing a strange error with TileCache rendering labels with
>> > Mapnik and a point shapefile. For zoom level 1 only labels on the
>> > southern hemisphere (the two bottom tiles) are rendered - see the
>> > image attachment on the link above. The other zoom levels are rendered
>> > correctly. It works when using standard latitude/longitide projection
>> > (EPSG:4326), but not "spherical mercator".
>> >
>> > Is this an issue with TileCache?
>> >
>> > Cheers,
>> > Bjørn
>> >
>> > http://blog.thematicmapping.org
>> >
>> _______________________________________________
>> Tilecache mailing list
>> Tilecache at openlayers.org
>> http://openlayers.org/mailman/listinfo/tilecache
>
>



More information about the Tilecache mailing list