r-spatial / discuss

a discussion repository: raise issues, or contribute!
54 stars 12 forks source link

three-dimensional vector data analysis #30

Open mkoohafkan opened 5 years ago

mkoohafkan commented 5 years ago

BLUP: What is the current state of three-dimensional feature (vector) analysis support in the R-Spatial universe?

I'm wondering what tools and capabilities R-Spatial provides for analysis of three-dimensional spatial objects. I have a need for computing 3D intersections and unions, and calculating attributes such as volume and surface area.

ArcGIS Pro provides some utilities for doing 3D analysis, but the toolset is fairly limited and definitely geared towards urban planning and visualization rather than generalized 3D computations. For example, calculations of volume are only available through either the Minimum Bound Volume tool (which potentially operates on a modification of the feature of interest) or the Surface Volume tool (which is limited to calculations based on a "reference plane"). There are other calculations that apparently not supported by ArcGIS at all, such as the calculation of surface area of a 3D plane (e.g. the output of the intersection of adjacent 3D features).

Based on some brief experimenting and a review of open questions on StackOverflow and similar forums, my understanding is that extensive support for 3D features is not provided by the current offerings from R-Spatial, including package sf. However, I do see some evidence that support for 3D spatial data is being developed for Raster Stacks in package cubeview. Is support for 3D feature analysis on the horizon?

edzer commented 5 years ago

@mdsumner ?

mdsumner commented 5 years ago

There's nothing in r-spatial that I know of. My focus has been on data structures and visualization, not on metrics. What forms do you have? Point clouds with implicit hulls, mesh surfaces, or actual volumetric elements? There's some scattered tools, packages like volesti, hypervolume, Rvcg, - misc3d has slices and marching cubes, geometry has delaunayn() and lots of packages visualize with rgl - you might find something in the rgl reverse deps.

Also @espinielli has been investigating trajectory cutting in volumes so might know more.

espinielli commented 5 years ago

Not much useful in R that I know of. Also those facilities built on top of Simple Feature are sticking to "planar" model of the world and support for 3rd (altitude) and 4th (time) dimension is not there. I have just see a tweet about an R Consortium sponsored project for sftraj, https://twitter.com/MabLabUF/status/1176701322688696327 which could be interesting/useful (I asked some questions there too...)

The problems I face with flight trajectories:

Any hints / directions / suggestions are of course welcome 😅

mkoohafkan commented 5 years ago

Thanks for the suggestions @mdsumner---I am working with actual volumetric elements generated by extrusion of 2D (xy) features in the vertical (z) direction. I am finding many inconsistencies in the ArcGIS 3D tools. I've tried a variety of workarounds but it seems like the functionality simply isn't there yet.

I looked through many of the packages you listed, but unfortunately I haven't seen anything that will help me accomplish my goals. I'm still looking through the rgl revdeps though.

I suspect my approach will end up being analyses on vertically-layered 2D features of uniform thickness with some custom logic to compute volumes and surface areas.