some issues around topology
I'm really interested in being able to push R spatial over the edge of GIS and into more general structures for modelling. I also believe we should be able to build 3D and 4D interactive plots with our current types, as easily as we can with 2D static plots.
I think some key lessons for doing this come from ggplot2, with its generalization of grouping and id (parts and features) and the coordinate system and geometry abstractions, which are all about "space" in its most general sense.
Another great resource is rgl, with its indexed mesh structures - though these aren't widely used, at least not for data that starts as "Spatial". These structures are always indexed "physically", and key issue is to convert between a structural index (the 1:length(x)) to a key-based join index.
Having full geometric generality (X, Y, Z, time, arbitary measurements) requires storing vertices in tables, because attributes are not all the same type. Full topological generality also benefits from tables, because the indexing/links between entities comes for free from database-like tools, and tables provide the right structures for storing data, once you normalize it properly.
Simple features is incredibly important part of this, as it provides a standard for the basic GIS interchange, but tools like D3 and WebGL and leaflet provide insight into where things can go. I believe that GIS stopped being general with the invention of the shapefile, when they dropped arc-node topology. You just can't lift out of that world without breaking the model. Arc-node was never going to work for 3D, which is why TINs and arc-node structures are not quite the same.
I'm working on telling this story more, but I think this vignette gives a reasonable overview:
https://r-gris.github.io/rangl/articles/spatial-normal-forms.html
It's not the easiest read, and it's nasty looking code in places, and at least some of the line segment examples are broken, but "it works mostly". I'm hoping to integrate the arc-node / TopoJSON side of the story much better with the "full triangulation" part, and I'm just in the middle of that still.
Thanks Tim for creating this space! I'll be looking to integrate some of these ideas with the htmlwidgets, crosstalk and leaflet.extras tools and examples.