I am creating tiles on my disk using TileStache from the raster files, my XML file has path of about 4000 Raster. Here is my tilestache Configuration file.
{
"layers": {
"tiles": {
"allowed origin": "*",
"provider": {
"name": "mapnik",
"mapfile": "TilingXML.xml"
}
}
},
"cache": {
"dirs": "portable",
"path": "tiledata",
"umask": "0000",
"name": "Disk"
}
}
Here is the sample xml file settings, and there are about 4000 more such entries in the xml file.
<Style name="boundary" filter-mode="first">
<Rule>
<PolygonSymbolizer fill-opacity="1" fill="#000000"/>
</Rule>
</Style>
<Layer name="boundary" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<StyleName>boundary</StyleName>
<Datasource>
<Parameter name="type"><![CDATA[postgis]]></Parameter>
<Parameter name="table"><![CDATA[(select * from societies where society_name='Satellite Town Block E' and city='Rawalpindi') as path]]></Parameter>
<Parameter name="key_field"><![CDATA[gid]]></Parameter>
<Parameter name="geometry_field"><![CDATA[geom]]></Parameter>
<Parameter name="extent_cache"><![CDATA[auto]]></Parameter>
<Parameter name="extent"><![CDATA[60.8918560000000966, 23.7030689999999993, 79.3057380000001046,37.0975899999999967]]></Parameter>
<Parameter name="dbname"><![CDATA[raster_tiles]]></Parameter>
<Parameter name="host"><![CDATA[******]]></Parameter>
<Parameter name="port"><![CDATA[*****]]></Parameter>
<Parameter name="user"><![CDATA[*******]]></Parameter>
<Parameter name="password"><![CDATA[*******]]></Parameter>
</Datasource>
</Layer>
<Style name="band1" filter-mode="first">
<Rule>
<RasterSymbolizer opacity="1" scaling="gaussian" comp-op="plus" default-mode="linear" default-color="rgba(0, 0, 0, 0)" epsilon="0.1">
<stop value="0" color="#000000"/>
<stop value="255" color="#ff0000"/>
</RasterSymbolizer>
</Rule>
</Style>
<Layer name="band1" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<StyleName>band1</StyleName>
<Datasource>
<Parameter name="file"><![CDATA[Data/2- Clipped/out_Rawalpindi__Satellite_Town_Block_E.tif]]></Parameter>
<Parameter name="band"><![CDATA[1]]></Parameter>
<Parameter name="noData"><![CDATA[255]]></Parameter>
<Parameter name="type"><![CDATA[gdal]]></Parameter>
</Datasource>
</Layer>
<Style name="band2" filter-mode="first">
<Rule>
<RasterSymbolizer opacity="1" scaling="gaussian" comp-op="plus" default-mode="linear" default-color="rgba(0, 0, 0, 0)" epsilon="0.1">
<stop value="0" color="#000000"/>
<stop value="255" color="#00ff00"/>
</RasterSymbolizer>
</Rule>
</Style>
<Layer name="band2" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<StyleName>band2</StyleName>
<Datasource>
<Parameter name="file"><![CDATA[Data/2- Clipped/out_Rawalpindi__Satellite_Town_Block_E.tif]]></Parameter>
<Parameter name="band"><![CDATA[2]]></Parameter>
<Parameter name="noData"><![CDATA[255]]></Parameter>
<Parameter name="type"><![CDATA[gdal]]></Parameter>
</Datasource>
</Layer>
<Style name="band3" filter-mode="first">
<Rule>
<RasterSymbolizer opacity="1" scaling="gaussian" comp-op="plus" default-mode="linear" default-color="rgba(0, 0, 0, 0)" epsilon="0.1">
<stop value="0" color="#000000"/>
<stop value="255" color="#0000ff"/>
</RasterSymbolizer>
</Rule>
</Style>
<Layer name="band3" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<StyleName>band3</StyleName>
<Datasource>
<Parameter name="file"><![CDATA[Data/2- Clipped/out_Rawalpindi__Satellite_Town_Block_E.tif]]></Parameter>
<Parameter name="band"><![CDATA[3]]></Parameter>
<Parameter name="noData"><![CDATA[255]]></Parameter>
<Parameter name="type"><![CDATA[gdal]]></Parameter>
</Datasource>
</Layer>
When there were few number of raster that were included in the xml file, the speed of creating tiles was relatively much faster, but now it has become very very slow. I have tried using "Multi" cache params as well, but that couldn't helped me.
Is there a way to increase the speed of creating tiles with these configurations and style?