Bases: object
>>> l = Layer("name")
>>> l.contains((0,0))
True
>>> l.contains((185, 94))
False
Returns x, y, z
>>> l = Layer("name")
>>> l.bbox
(-180, -90, 180, 90)
>>> l.resolutions[0]
0.703125
>>> l.getCell((-180.,-90.,0.,90.))
(0, 0, 0)
>>> l.getCell((-45.,-45.,0.,0.))
(3, 1, 2)
>>> l = Layer("name")
>>> l.getClosestCell(2, (84, 17))
(6, 2, 2)
>>> l = Layer("name")
>>> l.getResolution((-180,-90,0,90))
0.703125
>>> l = Layer("name")
>>> l.getTile((-180,-90,0,90)).bbox()
'-180.0,-90.0,0.0,90.0'
Returns size of grid at a particular zoom level
>>> l = Layer("name")
>>> l.grid(3)
(16.0, 8.0)
Bases: TileCache.Layer.Layer
Bases: TileCache.Layer.Tile
Bases: object
>>> l = Layer("name", maxresolution=0.019914, size="256,256")
>>> t = Tile(l, 18, 20, 0)
>>> l = Layer("name", maxresolution=0.019914)
>>> t = Tile(l, 18, 20, 0)
>>> t.bbox()
'-88.236288,11.95968,-83.138304,17.057664'
>>> l = Layer("name", maxresolution=0.019914)
>>> t = Tile(l, 18, 20, 0)
>>> t.bounds()
(-88.236288000000002, 11.959680000000006, -83.138303999999991, 17.057664000000003)
>>> l = Layer("name", maxresolution=0.019914, size="256,256")
>>> t = Tile(l, 18, 20, 0)
>>> t.size()
[256, 256]
Bases: object
Helper method for generating the XML content for a crossdomain.xml file, to be used to allow remote sites to access this content.
This function is designed to work around the fact that Python in Windows does not handle binary output correctly. This function will set the output to binary, and then write to stdout directly rather than using print.
Bases: TileCache.Swarm.Peer