[Tilecache] Use of tileCache with Mapnik
Dane Springmeyer
blake at hailmail.net
Thu Apr 30 12:16:21 EDT 2009
Arnaud,
Great, good to hear. I'm about to commit a change to Mapnik so that
that relative paths are interpreted based on the working directory of
the XML file (https://trac.mapnik.org/ticket/326), which should make
it easier to use relative paths with a TileCache process in the future.
Also, of interest to TileCache users, Mapnik trunk now supports 8-bit
PNG transparency.
- dane
On Apr 29, 2009, at 9:39 PM, Arnaud Vandecasteele wrote:
> Thank you so much for your help. The problem was the relative path.
>
>
> Regards
>
>
> Arnaud
>
> On Wed, Apr 29, 2009 at 9:34 PM, Dane Springmeyer
> <blake at hailmail.net> wrote:
> Arnaud,
>
> Try setting the full path to your shapefile in the XML.
>
> For example:
>
>> <Parameter name="file">/home/arnaud/data/tuto/
>> TM_WORLD_BORDERS_SIMPL-0.2</Parameter>
>
>
> Also, make sure you are pointing to the shapefile name, not the
> folder it is inclosed in.
>
> Lastly, if those things don't help try setting the projection
> property in your config:
>
> [world]
> type=Mapnik
> mapfile=/var/www/html/RetD/mapnik/mapfile.xml
> layers=world
> projection=+proj=latlong +datum=WGS84
>
>
> Dane
>
>
> On Apr 29, 2009, at 4:53 AM, Arnaud Vandecasteele wrote:
>
>> Hi all,
>>
>> I'm trying to use MapNik and tileCache with my own data.
>> The facti is i can generate a png file with MapNik but when I try
>> to do the same thing with TileCache I've only got the background I
>> defined in My XML Mapfile (<Map srs="+proj=latlong +datum=WGS84"
>> bgcolor="#4682b4">)
>>
>> My project is very simple and I don't know what is wrong. Could
>> someaone help to know where i made a mistake.
>>
>> Here is :
>>
>> ************* my python MapNik file :
>> import mapnik
>> mapfile="./mapfile.xml"
>> m = mapnik.Map(1400, 600)
>> mapnik.load_map(m, mapfile)
>> bbox = mapnik.Envelope(mapnik.Coord(-180.0, -75.0),
>> mapnik.Coord(180.0, 90.0))
>> m.zoom_to_box(bbox)
>> mapnik.render_to_file(m, './tuto02/world_populationTOTO.png', 'png')
>>
>>
>> ************* my xml file :
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <!DOCTYPE Map>
>> <Map srs="+proj=latlong +datum=WGS84" bgcolor="#4682b4">
>> <Style name="My_Style">
>> <Rule>
>> <PolygonSymbolizer>
>> <CssParameter name="fill">#c7e9b4</CssParameter>
>> </PolygonSymbolizer>
>> <LineSymbolizer>
>> <CssParameter name="stroke">black</CssParameter>
>> <CssParameter name="stroke-width">.1</CssParameter>
>> </LineSymbolizer>
>> </Rule>
>> </Style>
>> <Layer name="world" srs="+proj=latlong +datum=WGS84" status="on">
>> <StyleName>My_Style</StyleName>
>> <Datasource>
>> <Parameter name="file">./data/tuto/
>> TM_WORLD_BORDERS_SIMPL-0.2</Parameter>
>> <Parameter name="type">shape</Parameter>
>> </Datasource>
>> </Layer>
>> </Map>
>>
>>
>> ************* my TileCache configuration file :
>> [world]
>> type=MapnikLayer
>> mapfile=/var/www/html/RetD/mapnik/mapfile.xml
>> layers=world
>>
>> TileCache generate all the tile but only with the background color.
>>
>> Best regards and thanks for your help.
>>
>> Arnaud
>> --
>> --------------------------------------------------------------------
>> Van De Casteele Arnaud
>> 72 Rue de la colline des camélias 97400 Saint-Denis
>> 0262 30 67 79 - 0692 23 73 17
>> SIG - WebMapping - GPS embarqué
>> Site internet : http://geotribu.net/
>> _______________________________________________
>> Tilecache mailing list
>> Tilecache at openlayers.org
>> http://openlayers.org/mailman/listinfo/tilecache
>
>
>
>
> --
> --------------------------------------------------------------------
> Van De Casteele Arnaud
> 72 Rue de la colline des camélias 97400 Saint-Denis
> 0262 30 67 79 - 0692 23 73 17
> SIG - WebMapping - GPS embarqué
> Site internet : http://geotribu.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/tilecache/attachments/20090430/15476587/attachment.html
More information about the Tilecache
mailing list