[GRASS-user] problem on vectorizing a float point raster
Milton Cezar Ribeiro
miltinho.astronauta at gmail.com
Wed Jun 10 09:54:01 EDT 2009
Dear Roger and Micha,
Thank you for the reply. I will read carefully your coments, and write back
Both you clarified some interesting points to me.
2009/6/10 Micha Silver <micha at arava.co.il>
> 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...
> Roger Bivand wrote:
> I think that r.to.vect wants to build a line structure, like river
>> 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
>> where r.out.xyz may be helpful, followed by v.in.ascii if you will be
>> GRASS downstream, or if you want to emit a shapefile for GeoDa (another
>> If you really want to calculate a measure of spatial autocorrelation for
>> your raster, I suggest copying the raster to R with readRAST6, creating
>> neighbour list with dnearneigh() with max. distance the greater of ewres
>> 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,
>> 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
>>> 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 >
>>> t=temp71.img output=temp71_img_integer_vect_200m --o -b
>>> WARNING: Vector map <temp71_img_integer_vect_200m> already exists and
>>> 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.
>>> grass-user mailing list
>>> grass-user at lists.osgeo.org
>> Roger Bivand
>> Economic Geography Section
>> Department of Economics
>> Norwegian School of Economics and Business Administration
>> Helleveien 30
>> N-5045 Bergen, Norway
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the grass-user