[Tilecache] Configure (TMS) BoundingBox and Origin independently

Just van den Broecke just at justobjects.nl
Wed Apr 14 08:47:30 EDT 2010


Hi,

I tried (with success) a possible fix for this issue: in Services/TMS.py 
function layerCapabilities() line 77/78 the <BoundingBox> data can be 
populated with the layer.data_extent array i.s.o. the layer.bbox array. 
IMO layer.data_extent will always be valid since in Layer.py (line 153) 
layer.data_extent is set to either the config value data_extent or if 
not present the layer's bbox. This fix doesn't touch any of TC's inner 
workings, just reporting of Capabilities (Though this may impact some 
smart clients that take the <BoundingBox> lowerleft as origin)

Any views (Christopher?) ? thanks and best regards,

Just van den Broecke
The Netherlands
www.justobjects.nl


Just van den Broecke wrote:
> Hi,
> 
> I am using TileCache 2.10 TMS with ImageLayer layers. I would like to 
> configure the actual data extent different from the tile grid origin, 
> like described in the TMS standard:
> http://wiki.osgeo.org/wiki/Tile_Map_Service_Specification#TileMap_Resource
> (<Origin> and <BoundingBox>
> 
> I may overlook options but I see no way in doing this. For example, this 
> tilecache.cfg:
> 
> [GBKN]
> type=Image
> transparent=true
> spherical_mercator=false
> resolutions=860.160,430.080,215.040,107.520,53.760,26.880,13.440,6.720,3.360,1.680,0.840,0.420,0.210,0.105,0.0525
> metatile=yes
> bbox=-65200.96,242799.04,375200.96,683200.96
> srs=EPSG:28992
> file=/var/kademo/data/klic/10G058471_1/GB_all.png
> filebounds=139679,449517,139802,449595
> data_extent=139679,449517,139802,449595
> 
> I get from TileMap info:
> <BoundingBox minx="-65200.960000" miny="242799.040000" 
> maxx="375200.960000" maxy="683200.960000"/>
> <Origin x="-65200.960000" y="242799.040000"/>
> 
> i.s.o BoundingBox set to filebounds/data_extent (yes these are very 
> small areas). Also I see in TMS.py line 77: that Origin is set to 
> "layer.bbox[0], layer.bbox[1]". Or are there other ways ? thanks and 
> best regards,
> 
> --Just
> 
> Just van den Broecke
> The Netherlands
> www.justobjects.nl
> 
> 
> 
> 
> 
> _______________________________________________
> Tilecache mailing list
> Tilecache at openlayers.org
> http://openlayers.org/mailman/listinfo/tilecache
> 






More information about the Tilecache mailing list