[Rspatial-devel] SpatialLinesDataFrame with z-axis

Edzer Pebesma edzer.pebesma at uni-muenster.de
Tue Dec 1 09:20:59 CET 2015



On 01/12/15 04:04, Kent Johnson wrote:
> On Mon, Nov 30, 2015 at 2:44 AM, Roger Bivand <Roger.Bivand at nhh.no
> <mailto:Roger.Bivand at nhh.no>> wrote:
> 
>     On Mon, 30 Nov 2015, Kent Johnson wrote:
> 
>         Hi,
> 
>         I am working with spatial line data which has three axes - lat,
>         lon and
>         altitude and metadata for each line. I would love to have
>         something like a
>         SpatialLines3DDataFrame.
> 
> 
>     Why? Love isn't appropriate here - you need a use case. 
> 
> 
> OK. I would find it helpful to have a data structure to represent tracks
> in three dimensions with associated metadata. My data is airplane tracks
> from KML files and direct recording of flight data. Some useful operations:
> - Plot the tracks on a map using leaflet.
> - Find distance from each point in the track to a fixed point on the ground
> - Plot distance from a fixed point vs altitude
> - Find the point of closest approach to a fixed point on the ground
> - Find the altitude at point of closest approach
> - Associate attributes with each track such as flight number, departure
> time, nearest waypoint, etc.
> All of the above using collections of 200-300 tracks.

It may be worth looking at package trajectories, as it has the concept
of a track (trip), tracks (a track set, e.g. for one plane), and
trackscollection (a set of tracks, e.g. multiple planes).

In principle, sp SpatialPoints can cope with more than two dimensions,
so trajectories can do that too. There are however currently no
functions that compute distances in 3D where x and y are long/lat; I'd
be interested to add those.

Leaflet plotting could be obtained by coercing (and projecting)
TracksCollection to 2d SpatialLinesDataFrames; this is already there.

CRAN is a bit behind my devel version at github.com/edzer/trajectories/

> 
>     Have you looked at SpatialMultiPoints (as altitude could be an
>     attribute at a line segent end point, or a coordinate)?
> 
> 
> SpatialMultiPointsDataFrame looks promising, thanks for the pointer. 
> 
> 
>     Please use R-sig-geo for all contact - this list is only used by
>     developers.
> 
> 
> OK I will use that list in the future.
> 
> Kent 
> 
> 
>     Roger
> 
> 
>         Thanks,
>         Kent Johnson
> 
> 
>     -- 
>     Roger Bivand
>     Department of Economics, Norwegian School of Economics,
>     Helleveien 30, N-5045 Bergen, Norway.
>     voice: +47 55 95 93 55 <tel:%2B47%2055%2095%2093%2055>; fax +47 55
>     95 91 00 <tel:%2B47%2055%2095%2091%2000>
>     e-mail: Roger.Bivand at nhh.no <mailto:Roger.Bivand at nhh.no>
> 
> 
> 
> 
> _______________________________________________
> Rspatial-devel mailing list
> Rspatial-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rspatial-devel
> 

-- 
Edzer Pebesma
Institute for Geoinformatics (ifgi),  University of Münster,
Heisenbergstraße 2, 48149 Münster, Germany; +49 251 83 33081
Journal of Statistical Software:   http://www.jstatsoft.org/
Computers & Geosciences:   http://elsevier.com/locate/cageo/
Spatial Statistics Society http://www.spatialstatistics.info

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <http://lists.r-forge.r-project.org/pipermail/rspatial-devel/attachments/20151201/05fd1b14/attachment.sig>


More information about the Rspatial-devel mailing list