[GRASS-stats] Re: Problem with v.distance in spgrass6 package in R

Roger Bivand Roger.Bivand at nhh.no
Fri Oct 28 06:11:18 EDT 2011


On Fri, 28 Oct 2011, toke wrote:

> Hi Roger Thank you for your fast responds
>
> Here are the GRASS command. Which works
>
> v.distance from=recrea_h to=area_b1  from_type=centroid to_type=area dmax=1
> upload=to_attr column=area_b1 to_column=value
>
> It should be similar to this in R using the spgrass6 package
>
> execGRASS("v.distance",from="recrea_h", to="area_b1",
> from_type="centroid", to_type="area", dmax=as.integer(1),
> upload="to_attr", column="area_b1", to_column="value")
>
> the "84 categories with no nearest feature found" is to be expected as they
> are more than 1 meter away. What I want to do, in this command, is to take
> information in one polygon and give it to the other polygon given that they
> are less than 1 meter away.

In the latest spgrass6, please set an option to display code going out to 
GRASS:

set.echoCmdOption(TRUE)

before running execGRASS(), and report whether the GRASS command shown is 
identical with or different from the command line version, quoting both 
verbatim with all output.

Your figures are no help at all, I'm afraid.

To make progress, please try to reproduce this in spearfish, so that we 
are looking at the same thing. Please also report your GRASS platform and 
version for reference.

Roger

>
> here is a map of the polygons:
> https://www.dropbox.com/gallery/2874375/1/map?h=25554e
> https://www.dropbox.com/gallery/2874375/1/map?h=25554e
>
> Cheers Toke
>
> PS. I also tried doing simple distance calculations from a point feature to
> area feature. It did not work.
>
>
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/Problem-with-v-distance-in-spgrass6-package-in-R-tp6939286p6939508.html
> Sent from the Grass - Stats mailing list archive at Nabble.com.
> _______________________________________________
> grass-stats mailing list
> grass-stats at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-stats
>

-- 
Roger Bivand
Department of Economics, NHH Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the grass-stats mailing list