Hi,
I have lots of geo TIFF's or ECW's and I want to render tiles with mapnik.
I'm using gdaltindex to make a shapefile with those TIFF's:
gdaltindex orthos.shp tiffs/*.tif
Right now I'm not worried about the projection, I just want to get it done.
The output file of the script above is a blue rectange(with nothing).
Any idea what I'm doing wrong?
Thanks.
Python:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import mapnik
mapfile = 'shapes.xml'
map_output = 'shapes.png'
m = mapnik.Map(1024, 600)
mapnik.load_map(m, mapfile)
# LL = -8.633763, 41.152469
# UR = -8.609265, 41.164495
bbox = mapnik.Envelope(mapnik.Coord(-8.633763, 41.152469),
mapnik.Coord(-8.609265, 41.164495))
m.zoom_to_box(bbox)
mapnik.render_to_file(m, map_output)
The XML:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map>
<Map bgcolor="steelblue" srs="+proj=latlong +datum=WGS84">
<Style name="raster">
<Rule>
<RasterSymbolizer />
</Rule>
</Style>
<Layer name="porto" status="on">
<StyleName>raster</StyleName>
<Datasource>
<Parameter name="type">shape</Parameter>
<Parameter
name="file">/home/tyler/Projects/Python/tile_tests/shapes/orthos.shp</Parameter>
</Datasource>
</Layer>
</Map>
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users