tilecache.cfg readonly=yes

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

tilecache.cfg readonly=yes

Andrew Hughes-2
Hey All...

I've tried for several days to fix this and make a positive contribution
but my py sucks!


When I add the "readonly=yes" setting to my UnprojectedReadOnly
WMSLayer, TileCache v1.7 completely fails its initialization.
Consequently, all layers break and not just the readonly=yes Layer.


I know it fails somewhere inside Service._load (cls, *files) when
dealing with layers
================================================================
        layers = {}
        for section in config.sections():
            if section in cls.__slots__: continue
            layers[section] = cls.loadFromSection(
                                    config, section, Layer, cache = cache)



More information below if you want.....

My environment (Apache):
================================================================
Alias /tilecache/ "/var/www/tilecache/"
<Directory /var/www/tilecache/>
      Options FollowSymLinks
     AddHandler python-program .py
     PythonHandler TileCache.Service
     PythonOption TileCacheConfig /var/www/tilecache/tilecache_readonly.cfg
</Directory>

My tilecache.cfg
================================================================
[cache]
type=DiskCache
base=/data/tilecache

[UnprojectedStreet]
type=WMSLayer
url=http://localhost/cgi-bin/mapserv?map=./mapfiles/terra0702.map
srs=EPSG:4283
layers=GreyBack,Cadlite,ParksArea,NatParksArea,WaterPolygons,railwaycase,railall,railsleepers,case2,roads2,case,roads,freeways,roadlabels,suburbs,aus_cities
extension=jpg
metaTile=yes

[UnprojectedReadOnly]
type=WMSLayer
url=http://localhost/OutOfCoverage.gif
srs=EPSG:4283
extension=gif
layers=NOT_APPLICABLE
readonly=yes
_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Reply | Threaded
Open this post in threaded view
|

Re: tilecache.cfg readonly=yes

Christopher Schmidt-2
On Wed, Apr 18, 2007 at 11:56:45AM +0930, Andrew Hughes wrote:
> Hey All...
>
> I've tried for several days to fix this and make a positive contribution
> but my py sucks!

> When I add the "readonly=yes" setting to my UnprojectedReadOnly
> WMSLayer, TileCache v1.7 completely fails its initialization.
> Consequently, all layers break and not just the readonly=yes Layer.

This is what happens when a layer in the config is broken, yeah: fail
soon, fail fast, etc.

The problem is that you're attempting to set the readonly property on a
layer. It's only meant to be set on a Cache.

I'm not sure if this was a mailing list post or IRC, but at one point yu
described a desire to have two differnet layers, one which could create
new tiles, one which couldn't. The solution that I offered was to:
 * Change cache to support ability to have a readonly cache
 * Change config to accept a cache as a layer option, so you could
   tell the layer which of several caches to use.

I implemented the first, and the latter would need to be implemented by
someone else in order to solve the problem totally.

Another alternative to b) was to run in a seperate interpreter. (This is
what I'd do.)

Regards,
--
Christopher Schmidt
MetaCarta
_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Reply | Threaded
Open this post in threaded view
|

Re: tilecache.cfg readonly=yes

Andrew Hughes-2
Crystal clear,

thanks very much chris!


Christopher Schmidt wrote:

> On Wed, Apr 18, 2007 at 11:56:45AM +0930, Andrew Hughes wrote:
>  
>> Hey All...
>>
>> I've tried for several days to fix this and make a positive contribution
>> but my py sucks!
>>    
>
>  
>> When I add the "readonly=yes" setting to my UnprojectedReadOnly
>> WMSLayer, TileCache v1.7 completely fails its initialization.
>> Consequently, all layers break and not just the readonly=yes Layer.
>>    
>
> This is what happens when a layer in the config is broken, yeah: fail
> soon, fail fast, etc.
>
> The problem is that you're attempting to set the readonly property on a
> layer. It's only meant to be set on a Cache.
>
> I'm not sure if this was a mailing list post or IRC, but at one point yu
> described a desire to have two differnet layers, one which could create
> new tiles, one which couldn't. The solution that I offered was to:
>  * Change cache to support ability to have a readonly cache
>  * Change config to accept a cache as a layer option, so you could
>    tell the layer which of several caches to use.
>
> I implemented the first, and the latter would need to be implemented by
> someone else in order to solve the problem totally.
>
> Another alternative to b) was to run in a seperate interpreter. (This is
> what I'd do.)
>
> Regards,
>  


--

Regards,

*Andrew Hughes*
Software Engineer
LISAsoft Pty. Ltd. (Adelaide)

------------------------------------------------------------------------


      LISAsoft Pty. Ltd.

<http://www.lisasoft.com>
*ADELAIDE Office*
<http://terrapages.net/mapbutton/RetrieveButtonServlet?buttonID=4>
38 Greenhill Road
Wayville SA 5034
Australia
*Telephone +61 8 8272 1555*
*Facsimile +61 8 8271 1199*
        *SYDNEY Office*
<http://terrapages.net/mapbutton/RetrieveButtonServlet?buttonID=1>
Suite 112 The Lower Deck
Jones Bay Wharf
19-21 Pirrama Road
Pyrmont NSW 2009 AUS
*Telephone +61 2 8570 5060*
*Facsimile +61 2 8570 5099*
        *MELBOURNE Office*
<http://terrapages.net/mapbutton/RetrieveButtonServlet?buttonID=3>
Level 7 520 Collins Street
Melbourne VIC 3000
Australia
*Telephone +61 3 9629 1799*
*Facsimile +61 3 9629 4955*

------------------------------------------------------------------------
_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache