Skip to content
Prev 6862 / 29559 Next

3d-Shapefile in R

On Fri, 13 Nov 2009, Siber Rosi wrote:

            
Yes, but only for points. The objects used to represent lines and polygons 
are 2D. To move forward, a Line3D representation with downstream Lines3D 
and SpatialLines3D classes would be needed. However, analysis on 3D lines 
may be hard to do - so something more like GPX track_points might be more 
useful, or the representation of sequences of points from the trip or 
adehabitat (ltraj class) packages. Just being able to read the data is 
only the first step, finding an adequate representation with convenient 
analysis tools is probably harder.

Using the Z dimension in shapefiles is arguably not a portable way of 
representing this, using points with a constant lineID and sequence 
numbers increasing downstream, with elevation at the points, may be easier 
to handle. (Untried) Convert to say GPX and read as track_points, trying 
to retain the necessary attributes.

Hope this helps,

Roger