Hi Jürgen,

> I was testing now a couple of hours, but I can't find the problem. I
> simply want to display a shading with a GeoTiff, but it doesn't work.
>
> My XML-Style:
>       <Style name="raster">
>               <Rule>
>                       <RasterSymbolizer>
>                       </RasterSymbolizer>
>               </Rule>
>       </Style>
>
> My Layer:
>   <Layer name="shading" status="on" srs="+proj=merc +a=6378137 +b=6378137
> +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m [EMAIL PROTECTED]
> +no_defs +over">
>       <StyleName>raster</StyleName>
>       <Datasource>
>               <Parameter name="type">gdal</Parameter>
>               <Parameter
> name="file">/mapnik/data/raster/39_03_900913_hillshade.tif</Parameter>
>               <Parameter name="format">tiff</Parameter>
>       </Datasource>
>   </Layer>

I was having some difficulty with my hillshading images at first as well. 
Finally I was able to get a (so far very robust) working solution which 
seems to be only a little different to yours:

My layer definition does not contain the srs, and it contains status="on". 
The image is in spherical mercator (although warped with gdalwarp 
using "+proj=merc +ellps=sphere +R=6378137 +a=6378137 +units=m", instead of 
your string; though I do not know, whether that makes a difference), as 
well, but I do not mention that in the layer definition. Of course, the map 
has to use the same SRS, but you probably already know that.

For completeness here is my working setup, which uses images from the SRTM 
data set, merged by gdal_merge and warped using gdalwarp, and then 
processed by the hillshade tool (http://www.perrygeo.net/wordpress/?p=7):

<Style name="raster">
        <Rule>
                <RasterSymbolizer>
                </RasterSymbolizer>
        </Rule>
</Style>

<Layer name="dem" status="on">
        <StyleName>raster</StyleName>
        <Datasource>
                <Parameter name="type">gdal</Parameter>
                <Parameter name="file">/file/to/hillshade.tif</Parameter>
                <Parameter name="format">tiff</Parameter>
        </Datasource>
</Layer>

Good luck! And if this does not work, can you describe what does not work? 
Do you just get no background?

Yours,
-- 
Holger Schoener
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to