[Tilecache] Question about image output formats and error
seedingtilecache
David Alda Fernandez de Lezea
dalda at ikt.es
Mon May 31 06:58:58 EDT 2010
Hi,
Finally I solved the problem with gif transaparency. The problem was IMAGEMODE RGBA, it should be IMAGEMODE PC256 in gif definition. But I still have the problem of the errors while seeding and the very slow response while seeding, it takes a lot to make just one tile of 256x256, why could be happening??
03 (000014, 000002) = (591250.0000 4708750.0000 600625.0000 4718125.0000) [48.96
70s : 0.027/s] 49/224
Cache miss: 600625.0,4708750.0,610000.0,4718125.0, Tile: x: 15, y: 2, z: 3, time
: 207.169999838
03 (000015, 000002) = (600625.0000 4708750.0000 610000.0000 4718125.0000) [207.1
700s : 0.024/s] 50/224
Cache miss: 610000.0,4708750.0,619375.0,4718125.0, Tile: x: 16, y: 2, z: 3, time
: 1.73500013351
03 (000016, 000002) = (610000.0000 4708750.0000 619375.0000 4718125.0000) [1.735
0s : 0.025/s] 51/224
Traceback (most recent call last):
File "C:\ms4w\Apache\cgi-bin\tilecache-2.10\tilecache_seed.py", line 9, in <mo
dule>
TileCache.Client.main()
File "C:\ms4w\Apache\cgi-bin\tilecache-2.10\TileCache\Client.py", line 162, in
main
seed(svc, layer, map(int, args[1:3]), bboxlist , padding=options.padding, fo
rce = options.force, reverse = options.reverse)
File "C:\ms4w\Apache\cgi-bin\tilecache-2.10\TileCache\Client.py", line 117, in
seed
svc.renderTile(tile,force=force)
File "C:\ms4w\Apache\cgi-bin\tilecache-2.10\TileCache\Service.py", line 138, i
n renderTile
data = layer.render(tile, force=force)
File "C:\ms4w\Apache\cgi-bin\tilecache-2.10\TileCache\Layer.py", line 443, in
render
return self.renderTile(tile)
File "C:\ms4w\Apache\cgi-bin\tilecache-2.10\TileCache\Layers\WMS.py", line 29,
in renderTile
tile.data, response = wms.fetch()
File "C:\ms4w\Apache\cgi-bin\tilecache-2.10\TileCache\Client.py", line 58, in
fetch
response = self.client.open(urlrequest)
File "C:\Python25\Lib\urllib2.py", line 387, in open
response = meth(req, response)
File "C:\Python25\Lib\urllib2.py", line 498, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Python25\Lib\urllib2.py", line 425, in error
return self._call_chain(*args)
File "C:\Python25\Lib\urllib2.py", line 360, in _call_chain
result = func(*args)
File "C:\Python25\Lib\urllib2.py", line 506, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 504: Gateway Time-out
C:\ms4w\Apache\cgi-bin\tilecache-2.10>
Any ideas??
Thanks
Hello,
I'll explain the situation: We've got a WEB Gis Viewer that has several layers (an ortophoto as base layer and some vector layers as overlays) tiled via tilecache (MapServer + TileCache 2.10 + OL). The ortophoto output format I configured in mapfile was png 24 bit and for the overlays was gif, but as I didn't know anything about extension parameter in tilecache, I get all the images in png format. So, when we populated our viewer we noticed that the viewer had a slow reponse because of the png generated tiles.
So, what I'm looking for is a suggestion of how to configure the output format to get a good quality of image, but also a format that may not cause a slow performance of the viewer.
In my mapfile i've got this:
At MAP level
IMAGETYPE "image/png; mode=24bit"
OUTPUTFORMAT
NAME png
DRIVER "AGG/PNG"
MIMETYPE "image/png"
IMAGEMODE RGBA
EXTENSION "png"
FORMATOPTION "TRANSPARENT=ON"
FORMATOPTION "INTERLACE=OFF"
END
OUTPUTFORMAT
NAME gif
DRIVER "GD/GIF"
MIMETYPE "image/gif"
IMAGEMODE RGBA
EXTENSION "gif"
FORMATOPTION "TRANSPARENT=ON"
FORMATOPTION "INTERLACE=OFF"
END
OUTPUTFORMAT
NAME jpeg
DRIVER "GD/JPEG"
MIMETYPE "image/jpeg"
IMAGEMODE RGBA
EXTENSION "jpg"
FORMATOPTION "TRANSPARENT=ON"
FORMATOPTION "INTERLACE=OFF"
END
TRANSPARENT TRUE
IMAGECOLOR 255 255 255
UNITS METERS
At LAYER level
LAYER
NAME "cartografia_base"
STATUS ON
DATA "carto_base.shp"
TYPE LINE
METADATA
"wms_title" "Cartografía Base 5.000"
"wms_srs" "EPSG:23030"
"wms_name" "cartografia_base"
"wms_server_version" "1.1.1"
"wms_format" "image/gif"
"wms_transparent" "true"
END
...
Symbology
...
END
Maybe I mixed some things that shouldn't be OK.
Then in tilecache.cfg I set for the vector layers extension=gif
[cartografia_base]
type=WMSLayer
layers=cartografia_base
srs=EPSG:23030
maxResolution=292.96875
bbox=460000, 4690000, 610000, 4820000
url=http://192.168.1.65/cgi-bin/mapserv.exe?map=../htdocs/MFD/ejemplo_wms.map
extent_type=loose
extension=gif
but when execute tilecache_seed.py, apart from that it takes a lot to generate tiles, it doesn't create them properly, i mean that some lines (border lines or outbound lines) that were created before, now are not created, it finally it crashes.
C:\ms4w\Apache\cgi-bin\tilecache-2.10>tilecache_seed.py cartografia_base 0 3 ###### (0, 0, 0), (2, 2, 0) Cache miss: 460000.0,4690000.0,535000.0,4765000.0, Tile: x: 0, y: 0, z: 0, time:
110.217999935
00 (000000, 000000) = (460000.0000 4690000.0000 535000.0000 4765000.0000) [110.2 180s : 0.009/s] 1/4 Cache miss: 535000.0,4690000.0,610000.0,4765000.0, Tile: x: 1, y: 0, z: 0, time:
122.654999971
00 (000001, 000000) = (535000.0000 4690000.0000 610000.0000 4765000.0000) [122.6 550s : 0.009/s] 2/4 Cache miss: 610000.0,4690000.0,685000.0,4765000.0, Tile: x: 2, y: 0, z: 0, time:
1.43799996376
00 (000002, 000000) = (610000.0000 4690000.0000 685000.0000 4765000.0000) [1.438 0s : 0.013/s] 3/4 Cache miss: 460000.0,4765000.0,535000.0,4840000.0, Tile: x: 0, y: 1, z: 0, time:
99.2490000725
00 (000000, 000001) = (460000.0000 4765000.0000 535000.0000 4840000.0000) [99.24 90s : 0.012/s] 4/4 Traceback (most recent call last):
File "C:\ms4w\Apache\cgi-bin\tilecache-2.10\tilecache_seed.py", line 9, in <mo
dule>
TileCache.Client.main()
File "C:\ms4w\Apache\cgi-bin\tilecache-2.10\TileCache\Client.py", line 162, in main
seed(svc, layer, map(int, args[1:3]), bboxlist , padding=options.padding, fo rce = options.force, reverse = options.reverse)
File "C:\ms4w\Apache\cgi-bin\tilecache-2.10\TileCache\Client.py", line 117, in seed
svc.renderTile(tile,force=force)
File "C:\ms4w\Apache\cgi-bin\tilecache-2.10\TileCache\Service.py", line 138, i n renderTile
data = layer.render(tile, force=force)
File "C:\ms4w\Apache\cgi-bin\tilecache-2.10\TileCache\Layer.py", line 443, in render
return self.renderTile(tile)
File "C:\ms4w\Apache\cgi-bin\tilecache-2.10\TileCache\Layers\WMS.py", line 29, in renderTile
tile.data, response = wms.fetch()
File "C:\ms4w\Apache\cgi-bin\tilecache-2.10\TileCache\Client.py", line 58, in fetch
response = self.client.open(urlrequest)
File "C:\Python25\Lib\urllib2.py", line 387, in open
response = meth(req, response)
File "C:\Python25\Lib\urllib2.py", line 498, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Python25\Lib\urllib2.py", line 425, in error
return self._call_chain(*args)
File "C:\Python25\Lib\urllib2.py", line 360, in _call_chain
result = func(*args)
File "C:\Python25\Lib\urllib2.py", line 506, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 504: Gateway Time-out
C:\ms4w\Apache\cgi-bin\tilecache-2.10>
I've attached to images to see the difference between the first generated tiles and the last generated tiles.
I'm missing something??
Thanks in advance.
Un saludo,
··················································································
David Alda Fernández de Lezea
Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad
IKT
Granja Modelo s/n · 01192 · Arkaute (Araba)
··················································································
Tlfnos.: 945-00-32-95 Fax: 945-00.32.90
··················································································
email: dalda at ikt.es web: www.ikt.es
··················································································
More information about the Tilecache
mailing list