[R-sig-Geo] Import of 3D vector from grass into R?

Roger Bivand Roger.Bivand at nhh.no
Fri Jun 24 18:49:40 CEST 2011


On Fri, 24 Jun 2011, Rainer M Krug wrote:

> Hi
>
> Is it possible to import a 3D vector from GRASS into R, so that all three
> dimensions are available?
>
> I have 3D lines in GRASS which which I have to do some calculations from 
> the z-values.

Hi,

I don't think so. The code in rgdal does not accept any third dimension in 
lines or polygons, but may accept Z for points - the same applies to code 
for reading vector objects in maptools from shapefiles. Can you use 
v.to.points -v first to generate points? I think that you'd need to copy 
the input entity label or FID if possible to retain information on which 
point belongs to which line. This can also be reconstituted from the 
lengths starting at 0 in the second layer created by v.to.points.

Hope this helps,

Roger

>
> Cheers,
>
> Rainer
>
>

-- 
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 R-sig-Geo mailing list