Hi,

Mapnik is not capable of reprojecting images, so you'll need to have a  
matching projection for your map, your raster image, and you bounding  
box. In the XML below it looks like you have degrees for your layer  
bounds - those should be expressed in projected units instead, and the  
map's srs must match the layer's.

-mike.

On Apr 19, 2009, at 3:01 AM, Torsten Mohr wrote:

> Ouch, i'm sorry.  I missed that.
>
> I've changed the Layer description and also added some more  
> configuration
> according to this:
>
> http://trac.mapnik.org/wiki/RasterSymbolizer
>
> So i also added:
>
> <Style name="raster">
>    <Rule>
>        <RasterSymbolizer>
>            <CssParameter name="opacity">0.8</CssParameter>
>            <CssParameter name="scaling">bilinear</CssParameter>
>            <CssParameter name="mode">multiply2</CssParameter>
>        </RasterSymbolizer>
>    </Rule>
> </Style>
>
> <Layer name="bground_east" 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 +nadgri...@null
> +no_defs +over">
>    <StyleName>raster</StyleName>
>    <Datasource>
>      <Parameter name="type">raster</Parameter>
>      <Parameter
> name="file">/local/vid/earth/land_shallow_topo_east.tif</Parameter>
>      <Parameter name="format">tiff</Parameter>
>      <Parameter name="lox">0.0</Parameter>
>      <Parameter name="loy">-85.0511</Parameter>
>      <Parameter name="hix">180.0</Parameter>
>      <Parameter name="hiy">85.0511</Parameter>
>    </Datasource>
> </Layer>
>
>
> Hmm, still the image is not shown.
>
> I wonder why, i tried several changes, also leaving away the srs  
> entry.
> Also tried a different (smaller) TIF, tried it at different  
> locations on the
> map and different extents and also reordered the layers and tried
> different "mode" settings for the RasterSymbolizer.
>
> I've also tried putting the Layer on top of all other Layers.
>
>
> Hmm, just tried and changed the name of the used Style from "raster"  
> to
> "qweqwe".  The whole map still gets rendered, no error is thrown.   
> It seems
> the DataSource Raster does not use a Style at all, is that right?
>
> It looks to me that this contradicts to the description of the
> RasterSymbolizer in the URL above.
>
> The string "raster" only appears as Parameter name="raster" in the  
> osm.xml
> that i use, but nowhere else.
>
>
> Did i misconfigure something?  Do i need to supply a Style in a  
> different way?
>
>
> In the description it is mentioned that no reproject data (yet), so  
> it can't
> be that e.g. the aspect ratio of the input TIF is incorrect?
>
>
> Thanks for any hints,
> Torsten.
>
> Am Sonntag, 19. April 2009 10:27:55 schrieb Luca Delucchi:
>> 2009/4/19 Torsten Mohr <tm...@s.netic.de>:
>>> Hello,
>>>
>>> i tried another way and added this part to the osm.xml that i use to
>>> describe the map (as the first Layer):
>>>
>>> <Layer name="bground_east" status="on" lox="0.0" loy="-85.0511"
>>> hix="180.0" hiy="85.0511" 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  
>>> +nadgri...@null
>>> +no_defs +over"> <StyleName>world</StyleName>
>>>    <Datasource>
>>>      <Parameter name="type">raster</Parameter>
>>>      <Parameter
>>> name="file">/local/vid/earth/land_shallow_topo_east.tif</Parameter>
>>>      <Parameter name="lox">0.0</Parameter>
>>>      <Parameter name="loy">-85.0511</Parameter>
>>>      <Parameter name="lox">180.0</Parameter>
>>>      <Parameter name="lox">85.0511</Parameter>
>>>    </Datasource>
>>> </Layer>
>>
>> you must use lox,loy,hiy and hix, in your file you have set only lox
>> and loy. Try with the following code
>>
>> <Layer name="bground_east" status="on" lox="0.0" loy="-85.0511"
>> hix="180.0" hiy="85.0511" 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 +nadgri...@null +no_defs  
>> +over">
>>    <StyleName>world</StyleName>
>>    <Datasource>
>>      <Parameter name="type">raster</Parameter>
>>      <Parameter
>> name="file">/local/vid/earth/land_shallow_topo_east.tif</Parameter>
>>      <Parameter name="lox">0.0</Parameter>
>>      <Parameter name="loy">-85.0511</Parameter>
>>      <Parameter name="hiy">180.0</Parameter>
>>      <Parameter name="hix">85.0511</Parameter>
>>    </Datasource>
>> </Layer>
>>
>> regar
>> Luca
>
> _______________________________________________
> Mapnik-users mailing list
> Mapnik-users@lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/mapnik-users
>

----------------------------------------------------------------
michal migurski- m...@stamen.com
                  415.558.1610



_______________________________________________
Mapnik-users mailing list
Mapnik-users@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to