Updated RasterSymbolizer (markdown)
parent
1db01b16f2
commit
99df717f8f
1 changed files with 43 additions and 34 deletions
|
@ -17,9 +17,12 @@ The RasterSymbolizer is used to render an image from any [GDAL supported format]
|
||||||
|
|
||||||
* As of Mapnik 0.8 the RasterSymbolizer can be assigned a RasterColorizer to color a raw data raster according to a palette. This is useful for visualizing scientific data, dynamically changing the color gradient of a DEM, etc...
|
* As of Mapnik 0.8 the RasterSymbolizer can be assigned a RasterColorizer to color a raw data raster according to a palette. This is useful for visualizing scientific data, dynamically changing the color gradient of a DEM, etc...
|
||||||
|
|
||||||
[[BR]]
|
![tile](http://pavlenko.f2s.com/tiles/srtm3/9/277/197.png)
|
||||||
||[[Image(http://pavlenko.f2s.com/tiles/srtm3/9/277/197.png)]]||[[Image(http://media.mapnik.org/tiles/relief/7/63/42.png)]]||[[Image(http://1.tiles.ump.waw.pl/ump_tiles/12/2265/1395.png)]]||[[Image(http://toolserver.org/~cmarqu/hill/12/2265/1395.png)]] ||
|
![tile](http://media.mapnik.org/tiles/relief/7/63/42.png)
|
||||||
|| || || ||Processed as described in http://wiki.openstreetmap.org/wiki/Hillshading_using_the_Alpha_Channel_of_an_Image||
|
![tile](http://1.tiles.ump.waw.pl/ump_tiles/12/2265/1395.png)
|
||||||
|
![tile](http://toolserver.org/~cmarqu/hill/12/2265/1395.png)
|
||||||
|
|
||||||
|
Processed as described in http://wiki.openstreetmap.org/wiki/Hillshading_using_the_Alpha_Channel_of_an_Image
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
|
|
||||||
|
@ -44,44 +47,50 @@ See the [wiki:GDAL] plugin and [wiki:Raster] plugin pages for more info
|
||||||
Default (simply renders a copy of the raster)
|
Default (simply renders a copy of the raster)
|
||||||
|
|
||||||
|
|
||||||
#!xml
|
```xml
|
||||||
<Style name="My Style">
|
#!xml
|
||||||
<Rule>
|
<Style name="My Style">
|
||||||
<RasterSymbolizer/>
|
<Rule>
|
||||||
</Rule>
|
<RasterSymbolizer/>
|
||||||
</Style>
|
</Rule>
|
||||||
|
</Style>
|
||||||
|
```
|
||||||
|
|
||||||
Using the new 0.6.0 release opacity / merging / scaling options:
|
Using the new 0.6.0 release opacity / merging / scaling options:
|
||||||
|
|
||||||
#!xml
|
```xml
|
||||||
<Style name="raster">
|
#!xml
|
||||||
<Rule>
|
<Style name="raster">
|
||||||
<RasterSymbolizer>
|
<Rule>
|
||||||
<CssParameter name="opacity">0.5</CssParameter>
|
<RasterSymbolizer>
|
||||||
<!--<CssParameter name="scaling">fast</CssParameter>-->
|
<CssParameter name="opacity">0.5</CssParameter>
|
||||||
<CssParameter name="scaling">bilinear</CssParameter>
|
<!--<CssParameter name="scaling">fast</CssParameter>-->
|
||||||
<!--<CssParameter name="scaling">bilinear8</CssParameter>-->
|
<CssParameter name="scaling">bilinear</CssParameter>
|
||||||
|
<!--<CssParameter name="scaling">bilinear8</CssParameter>-->
|
||||||
|
|
||||||
<!--<CssParameter name="mode">grain_merge</CssParameter>-->
|
<!--<CssParameter name="mode">grain_merge</CssParameter>-->
|
||||||
<!--<CssParameter name="mode">grain_merge2</CssParameter>-->
|
<!--<CssParameter name="mode">grain_merge2</CssParameter>-->
|
||||||
<!--<CssParameter name="mode">multiply</CssParameter>-->
|
<!--<CssParameter name="mode">multiply</CssParameter>-->
|
||||||
<CssParameter name="mode">multiply2</CssParameter>
|
<CssParameter name="mode">multiply2</CssParameter>
|
||||||
<!--<CssParameter name="mode">divide</CssParameter>-->
|
<!--<CssParameter name="mode">divide</CssParameter>-->
|
||||||
<!--<CssParameter name="mode">divide2</CssParameter>-->
|
<!--<CssParameter name="mode">divide2</CssParameter>-->
|
||||||
<!--<CssParameter name="mode">screen</CssParameter>-->
|
<!--<CssParameter name="mode">screen</CssParameter>-->
|
||||||
<!--<CssParameter name="mode">hard_light</CssParameter>-->
|
<!--<CssParameter name="mode">hard_light</CssParameter>-->
|
||||||
</RasterSymbolizer>
|
</RasterSymbolizer>
|
||||||
</Rule>
|
</Rule>
|
||||||
</Style>
|
</Style>
|
||||||
|
```
|
||||||
|
|
||||||
## Python Styles
|
## Python Styles
|
||||||
|
|
||||||
|
|
||||||
#!python
|
```python
|
||||||
s = Style()
|
#!python
|
||||||
r=Rule()
|
s = Style()
|
||||||
r.symbols.append(RasterSymbolizer())
|
r=Rule()
|
||||||
s.rules.append(r)
|
r.symbols.append(RasterSymbolizer())
|
||||||
|
s.rules.append(r)
|
||||||
|
```
|
||||||
|
|
||||||
## C++
|
## C++
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue