[GRASS-dev] geotiff to wms

Hamish hamish_b at yahoo.com
Thu Dec 8 19:30:14 EST 2011

Mohammed wrote:
> All,Is there any way to show GRASS GIS raster data as a wms
> layer anything like r.out.wms ? i want to visualize data from
> GRASS GIS on openlayers. openlayers doesnt support raster maps


sure, export with 'r.out.png -t -w' and then use gdal2tiles.py
(or the MapTiler frontend to it) to create the tile cache and
the appropriate OL HTML. Copy the resulting directory on to
the web server & you're done. whole job done in 60 seconds!
works great!

a similar example can be found in the r.out.kml addon script.

long-standing todo: add a "Make NULL cells transparent" flag
to r.out.tiff.

to preserve full colors you'll want to use r.out.png, r.out.tiff
or r.out.ppm, not r.out.gdal (which focuses on exporting data
correctly, as opposed to only caring about the visual image).


More information about the grass-dev mailing list