3

I'm attempting to seed my tile cache on the server for use within OpenLayers for a few zoom levels, however the script doesn't seem to be working at all and everything I try I just get the same output.

The data displays fine when I view it in a browser using OpenLayers and the cache is generated based on what I look at.

The server is running Ubuntu 12.04.1 LTS which has nothing but Mapserver, Apache, Tilecache, and the required libs for that installed on.

My config files are as follows -

Tilecache Config

[cache]
type=Disk
base=/home/tilecache

[streetview]
size=256,256
srs=EPSG:27700
type=WMS
url=http://localhost/cgi-bin/mapserv?map=/home/mapadmin/data/tm/out/comp/tm.map
layers=streets
mapfile=/home/mapadmin/data/tm/out/comp/tm.map
bbox=600000,200000,660000,30000
extension=png
mime_type=image/png
maxresolution=234.375
extent_type=loose
levels=20
expire=3600

Mapserver Config

MAP
        IMAGETYPE       PNG
        EXTENT          600000.000000 200000.000000 660000.000000 300000.000
        SIZE            800 600
        SHAPEPATH       "/home/mapadmin/data/tm/out/comp/"
        IMAGECOLOR      255 255 255

        PROJECTION
                "init=epsg:27700"
        END

        WEB
                METADATA
                        "ows_enable_request"   "*"
                        "wms_title"             "WMS Street Test"
                        "wms_onlineresource"    "http://192.168.1.126/cgi-bin/mapserv?map=/home/mapadmin/data/tm/out/comp/tm.map&"
                        "wms_srs"               "EPSG:27700"
                END
        END

        LAYER
                NAME            streets
                STATUS          on
                TYPE            RASTER
                TILEINDEX       "tm.shp"
                TILEITEM        "LOCATION"

                PROJECTION
                        "init=epsg:27700"
                END

                METADATA
                        "wms_title"     "Streetview"
                        "wms_srs"       "EPSG:27700"
                END
        END
END

Output from terminal

mapadmin@mapserver:/etc$ sudo tilecache_seed.py "streetview" 04 09 -b "600000, 200000, 660000, 30000" -p 1 -f -c /etc/tilecache.cfg
Config file set to /etc/tilecache.cfg
###### (0, 0, 4), (16, -45, 4)
###### (0, 0, 5), (32, -90, 5)
###### (0, 0, 6), (64, -181, 6)
###### (0, 0, 7), (128, -362, 7)
###### (0, 0, 8), (256, -725, 8)
mapadmin@mapserver:/etc$

Any help on this would be great as it's really driving me nuts now, I've spent hours trying to work out why it's just not working.

Thanks

2 Answers 2

2

Here is a guide that is using Ordnance Survey tilecached rasters

enter image description here

http://www.esdmwms.no-ip.co.uk/scripts/tilecache/tilecache-2.11/indexOS27700.html

(some tiles are no longer present - seems the location has been moved/expired)

How to Guide http://www.esdmdata.co.uk/tilecache-on-iis7-how-to

2
  • Thanks for the links, unfortunately I'm using Linux and these are based around Windows. I've managed to solve my issue after having a break though.
    – boardyuk
    Commented Oct 16, 2012 at 14:20
  • They are based in python which will work on Ubuntu
    – Mapperz
    Commented Oct 16, 2012 at 14:23
2

I managed to find the issue with this after having a break for a while and coming back to it.

The Mapserver config needed the EXTENT parameter changing from

EXTENT          600000.000000 200000.000000 660000.000000 300000.000

to

EXTENT          600000.000000 200000.000000 660000.000000 300000.000000

Once I'd made this change I ran the command from within a new downloaded copy of Tilecache 2.11

sudo python tilecache_seed.py "streetview" 04 09 -b 600000.000000,200000.000000,660000.000000,300000.000000 -p 1 -f -c /etc/tilecache.cfg

This now appears to be generating the cache for me.

Hope that helps anyone else who's having issues :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.