Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Currently I am using mapnik2 with tilecache for map generation. As there is shift in some of the tiles generated,I am trying to configure mapserver with tilecache for caching tiles. I have installed mapserver 6.2.1 and tilecache 2.11. In the tilecache.cfg file , I configure as below to access map data:

[Layername]
type=MapServerLayer
bbox=255923,904698,1050731,1437039
data_extent=255923,904698,1050731,1437039
layers=layer1,
mapfile=/path to mapfile/
srs=EPSG:32643

When I check if tiles are generated by using the url:

http://tilecache.org/docs/README.html

an xml file is generated with error being,

<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
<ServiceExceptionReport version="1.1.1">
<ServiceException code="LayerNotDefined">
msWMSLoadGetMapParams(): WMS server error. Invalid layer(s) given in the LAYERS parameter. A layer might be disabled for this request. Check wms/ows_enable_request settings.
</ServiceException>
</ServiceExceptionReport>
Cache-Control: max-age=10, must-revalidate
Content-type: text/plain

An error occurred: msWMSLoadGetMapParams(): WMS server error. Invalid layer(s) given in the LAYERS parameter. A layer might be disabled for this request. Check wms/ows_enable_request settings.
  File "/var/www/tilecache/TileCache/Service.py", line 343, in cgiHandler
    format, image = service.dispatchRequest( params, path_info, req_method, host )
  File "/var/www/tilecache/TileCache/Service.py", line 208, in dispatchRequest
    return self.renderTile(tile, params.has_key('FORCE'))
  File "/var/www/tilecache/TileCache/Service.py", line 138, in renderTile
    data = layer.render(tile, force=force)
  File "/var/www/tilecache/TileCache/Layer.py", line 444, in render
    return self.renderTile(tile)
  File "/var/www/tilecache/TileCache/Layers/MapServer.py", line 50, in renderTile
    wms.loadOWSParameters(req)
  File "/usr/lib/python2.7/dist-packages/mapscript.py", line 1770, in loadOWSParameters
    def loadOWSParameters(self, *args): return _mapscript.mapObj_loadOWSParameters(self, *args)

Please help me in solving this issue.Thanks in advance.

share|improve this question
    
I guess that layers=layer1, is not what you wanted. –  Andre Joost Jun 22 '13 at 12:57
    
I changed code to 'layers = layer1',but the error still exists. –  user12757 Jun 24 '13 at 4:16
    
Hi I checked map rendering which is currently by mapnik. I checked whether lat,lon values of point data in my database is same as that shown in the map. By testing I found out that point shown in the map is wrong and that in database is right. Is there a way to correct the mapnik's shift of point data in the map.Thanks in adance. –  user12757 Jun 26 '13 at 6:27
    
Can you give an example of coordinates? Maybe the srs:32643 is ignored by mapnik. –  Andre Joost Jun 26 '13 at 12:45
    
Hi, the lon-lat values of one of my point data stored in postgis database is (686211.905776594,976780.153872843). But in map display the lon-lat value becomes (686522.74817,976713.34693). In the tilecache.cfg and mapnik xml file, srs is denoted as "srs=EPSG:32643". Thanks in advance. –  user12757 Jun 28 '13 at 4:03
show 5 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.