[GRASS-user] exporting raster map to kmz?

Thomas Adams tea3rd at gmail.com
Fri Jul 25 09:14:02 PDT 2014


Vishal,

>From what I have experienced and read, I believe there could be a color map
issue to sort out — I don't know how to do that; I saw the same thing when
I imported a geoTiff image.

Tom


On Fri, Jul 25, 2014 at 12:09 PM, Vishal Mehta <vishalm1975 at gmail.com>
wrote:

> thanks for your suggestions,
>
> i dont really want to convert raster to vector at the exploratory stage
> i'm in- was just looking to use in-built tools that converted the raster to
> a png and wrappend kml around it- which is what r.out.kml did.
>
> however, i have never before used this GUI-based "KML SUPEROVERLAY" format
> option that appears with v.out.ogr. thats what i've been trying and failing
> - just getting a black box which is correctly georegistered. i have a
> feeling its to do with the rendering of colors for each thematic class, and
> that in turn might be to do with the data type..but its just a guess.
>
> Vishal
>
>
> On Fri, Jul 25, 2014 at 5:30 AM, Thomas Adams <tea3rd at gmail.com> wrote:
>
>> Sylvain,
>>
>> I agree with your approach. However, I have run into one difficulty,
>> which is if the raster is very detailed (say, 1-ft Lidar) and the
>> computational region is relatively large (several square kilometers), GRASS
>> has considerable problems with the raster-to-vect conversion. The problem
>> is that each raster pixel is transformed to a polygon, so the result is
>> that there can be millions of polygons which the v.build process embedded
>> within r.to.vect , seems to run out of memory. This happens despite the
>> fact that I am running GRASS on 64-bit Ubuntu Linux with 16 GB RAM
>>
>> My process is this:
>>
>> r.to.vect -b input=flood_225.50 at teaiii output=flood_225_50 type=area
>>
>> v.db.addcolumn map=flood_225_50 at teaiii columns="flood_area varchar(12)"
>> v.db.update map=flood_225_50 at teaiii layer=1 column=flood_area
>> value=225_50
>> v.dissolve input=flood_225_50 at teaiii column=flood_area
>> output=flood_225_50_dissolve
>> v.out.ogr -c --overwrite input=flood_226_50_dissolve at teaiii
>> dsn=flood_226_50.kml format=KML
>>
>> Over the same computational region, if my grid resolution is 3-meters, I
>> have no problems; with 1-ft (~0.3 meters) grid resolution, I have problems.
>>
>> Regards,
>>
>> Tom
>>
>>
>>
>>
>>
>>
>>
>> On Fri, Jul 25, 2014 at 3:43 AM, Sylvain Maillard <
>> sylvain.maillard at gmail.com> wrote:
>>
>>> Hi,
>>>
>>> kml is usually more used for vector data.
>>> looking at the header "<img style="margin-right: 0px;"
>>> src="data:image/png;base64,iVBORw0KGgo", it seems that r.out.gdal is just
>>> writing the binary code for your raster in an image tag in the kml file ...
>>>
>>> Have you try to transform your raster into vector (
>>> http://grass.osgeo.org/grass64/manuals/r.to.vect.html) and then to
>>> export the vector to kml ?
>>>
>>>
>>> Sylvain
>>>
>>>
>>>
>>> 2014-07-23 20:26 GMT+02:00 Vishal Mehta <vishalm1975 at gmail.com>:
>>>
>>>> Hi all,
>>>>
>>>> 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.
>>>>
>>>> Thanks!
>>>> Vishal
>>>>
>>>> --
>>>> Vishal K. Mehta, PhD
>>>> Sr Scientist
>>>> Stockholm Environment Institute - US
>>>> 133 D St Suite F
>>>> Davis CA 95616
>>>> www.sei-us.org
>>>>
>>>> _______________________________________________
>>>> grass-user mailing list
>>>> grass-user at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>>>
>>>
>>>
>>> _______________________________________________
>>> grass-user mailing list
>>> grass-user at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>>
>>
>>
>>
>>
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>
>
>
>
> --
> Vishal K. Mehta, PhD
> Scientist
> Stockholm Environment Institute - US
> 133 D St Suite F
> Davis CA 95616
> www.sei-us.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20140725/4a932fb4/attachment-0001.html>


More information about the grass-user mailing list