[GRASS-user] exporting raster map to kmz?

Hamish hamish.webmail at gmail.com
Mon Jul 28 04:25:31 PDT 2014


Vishal wrote:
> I'm trying to classify a LANDSAT8 image. In the process, i'd like to
> export an unsupervised classification i did (using i.cluster,
> followed by i.maxlik) raster (type:CELL) into kml/kmz, so that I
> could get some visual idea of the classification. the classification
> is from 1 to 10, with null data present.
> 
> r.out.gdal -c input=lsat2014_unsupervised at PERMANENT
> output=C:\Users\Vishal\Documents\GIS\file3.kmz format=KMLSUPEROVERLAY
> type=Byte nodata=0
> 
> but no matter what flags i try, i get a black box on google earth.
> 
> 
> I'm just using the GUI options, Grass7svn on Windows. FYI, I do know
> how to do this by modifying add-on r.out.kml in Linux, but it would
> be good if i could just do my entire workflow on one platform.

Hi,

(see  http://grasswiki.osgeo.org/wiki/AddOns/GRASS_6#r.out.kml )

The r.out.kml addon module should work with GRASS 6.4 on MS Windows
as far as I can tell. If you want to export as JPEG instead of PNG
you'll need to install the Windows build of the NetPBM programs to
get pnmtojpeg.exe though.

It uses r.out.png which exports as colors not values, so the color
table should be preserved.

It is not ported to python for GRASS 7 yet, but it's a pretty simple
script, so shouldn't be too hard.


regards,
Hamish


More information about the grass-user mailing list