Added the Python code to create a raster datasource
parent
5de022a67e
commit
0f71192f9e
1 changed files with 6 additions and 0 deletions
|
@ -98,6 +98,12 @@ To style a layer use the [[RasterSymbolizer]]
|
|||
<Parameter name="hiy">max_y</Parameter>
|
||||
</Datasource>
|
||||
</Layer>
|
||||
|
||||
from mapnik import Raster, Layer
|
||||
raster = Raster(base='/home/mapnik/data',file='/path/to/my/raster/file.tiff',lox=minx,loy=min_y,hix=max_x,hiy=max_y)
|
||||
lyr = Layer('Tiff Layer')
|
||||
lyr.datasource = raster
|
||||
|
||||
```
|
||||
|
||||
## C++
|
||||
|
|
Loading…
Add table
Reference in a new issue