Skip to content
Prev 7911 / 29559 Next

[Fwd: Re: raster to polygons]

-------- Original Message --------
Subject: Re: raster to polygons
Date: Thu, 25 Mar 2010 18:08:44 +0100
From: Agustin Lobo <Agustin.Lobo at ija.csic.es>
Reply-To: Agustin.Lobo at ija.csic.es
To: Tim (LWF) <Tim.Haering at lwf.bayern.de>,  sig-geo <r-sig-geo at stat.math.ethz.ch>
References: 
<70FC67C4A585D1489E66225A4E0238BA7C8B29 at RZS-EXC-CL06.rz-sued.bayern.de> 
<4BAA436A.2040106 at ija.csic.es> 
<70FC67C4A585D1489E66225A4E0238BA7C90E3 at RZS-EXC-CL06.rz-sued.bayern.de>

Tim,

1. You do not need the first conversion:
"delme.tif")
as this is transforming to tif and you already start from a tif.
2. If your input is not a grid image, then you do not need all the part
starting with read.dbf()
3. Both gdal_translate and gdal_polygonize.py are part of gdal utilities
(not just the gdal library that you must have if you use rgdal) and
my function uses system() to execute them as external commands in the OS (linux
ubuntu in my case). The good thing of gdal_polygonize.py is that
it is very fast and memory efficient. But it looks like you do not have them,
and I'm not sure how cumbersome installing this will be under windows now, it
used to be tricky. Check in gdal.com,
and/or other people from this lists might advice you, but perhaps you can carry
out the same
type of operation with grass or saga through R. My experience in stalling packages
like gdal or grass in windows through osgeo4w is that it implies a time that
is better invested on using linux. Perhaps installing saga for windows is
easier, I have only tried it on linux systems.
4. Finally, check package raster, perhaps Robert Hijmans has included a function
equivalent to gdal_polygonize.py That would be the very best in my opinion.

Agus
H?ring wrote: