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

toke tepp at life.ku.dk
Fri Oct 28 04:41:45 EDT 2011


I think that I might have found a bug in spgrass6 or I might be doing
something wrong. When I call v.distance within R it seems to calculate but
it do not update the column of interest.

Im using the the following software:

platform    x86_64-pc-linux-gnu 10.10          
language   R                            
version.string R version 2.13.2 (2011-09-30)

Here are my script

R

#calling library
library(spgrass6)
# checking GRASS setup
gmeta6()

output:
gisdbase    /home/toke/Desktop/PHD/databehandling/artikel_3/gis/grassdb
location    mapset
mapset      aalborg
rows        1200
columns     1100
north       6328400
south       6316400
west        551800
east        562800
nsres       10
ewres       10
projection  +proj=utm +no_defs +zone=32 +a=6378137 +rf=298.257222101
+to_meter=1

# reading spatial files from GRASS database
recrea_h <-readVECT6("recrea_h")
area_b1 <-readVECT6("area_b1")

execGRASS("v.distance", flags=c("overwrite"), 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")
100%
100%
84 categories - no nearest feature found
235 categories read from the map
235 categories exist in the table
235 categories read from the map exist in the table
235 records updated
v.distance complete.

The column is not updated even though it seems that it is actually are
calculating.

The same calculation in GRASS works.

Cheers Toke  


--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Problem-with-v-distance-in-spgrass6-package-in-R-tp6939286p6939286.html
Sent from the Grass - Stats mailing list archive at Nabble.com.


More information about the grass-stats mailing list