Hello Milton

Roger's answer was, as always, both complete and to the point.

As a further exercise, I took a small region of 540000 cells with floating point values, and using the "feature=area" option to r.to.vect I created a vector map of polygons. It produced over 360000 polygons. Most will be polygons of 1 cell in size (from the original raster). I assume that's *not* what you're looking for...

--

Micha


Roger Bivand wrote:

I think that r.to.vect wants to build a line structure, like river channels,
but sees all the raster cells occupied, so no linear structure, and the
advice to thin first is then appropriate. If this is connected to your
question about calculating a measure of spatial autocorrelation for the
raster data, then I suspect that you do not need polygons but rather points,
where r.out.xyz may be helpful, followed by v.in.ascii if you will be using
GRASS downstream, or if you want to emit a shapefile for GeoDa (another
posting).

If you really want to calculate a measure of spatial autocorrelation for
your raster, I suggest copying the raster to R with readRAST6, creating the
neighbour list with dnearneigh() with max. distance the greater of ewres and
nsres, and proceeding from there in the usual way. But please consider the
inevitable fact that unless the resolution of your raster matches the
"natural" support of the phenomenon of interest, the observed
autocorrelation will certainly be driven by your having multiple
neighbouring "observations" of each "entity", in addition to not having
demeaned (detrended) the data. This means that any results will almost
certainly be spurious.

Hope this helps,

Roger


Milton Cezar Ribeiro wrote:
Dear Grass-Gurus,

I have a 2400x2200 raster image with values ranging
from 0.1 to 42, in float format. Now I need
vetororize the image, on the way that each pixel
come to be a polygon and the pixel value be stored as
attribute.

I am trying to do this using:
r.to.vect input=temp71.img output=temp71_img_integer_vect_200m --o -b

but grass return the following error messages:

GRASS 6.4.0svn (newLocation):C:/GRASS-6-SVN/msys/home/mjfortin > r.to.vect
inpu
t=temp71.img output=temp71_img_integer_vect_200m --o -b
WARNING: Vector map <temp71_img_integer_vect_200m> already exists and will
         be overwritten
WARNING: Table <temp71_img_integer_vect_200m> linked to vector map
         <temp71_img_integer_vect_200m> does not exist
Extracting lines...
ERROR: Raster map is not thinned properly.
       Please run r.thin.
By the way, I am running grass under a WinXp 64bit.
Any help are welcome.

Cheers

milton
brazil=toronto

_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user




-----
Roger Bivand
Economic Geography Section
Department of Economics
Norwegian School of Economics and Business Administration
Helleveien 30
N-5045 Bergen, Norway


_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to