The silicate package provides a normal-form data model and functions for explicitly topological structures. A PATH as a central form along with more topological counterparts (composed of primitives) provides generic scheme for hierarchical data representation and transformations.
PATH corresponds to one standard definition for points, lines, and areas used in graphics and spatial applications, but adds normalization of coordinates (de-duplication). By default this is done in “X-Y” (the first two geometric dimensions). A shared vertex pool is referenced indirectly by paths that include that location.
Normal-form is in contrast to many applications that explicitly list coordinate instances within hierarchical structures. This can be less efficient in terms of storage and transmission, but is necessary for tasks applied to the relationships between objects. Many applications do this normalization on-the-fly and then discard it in favour of a simplistic summary, and the trade-off is in keeping the normalization and topology explicit rather than generating it in bespoke ways.
PATH is an important intermediate form from which other types of structures can be derived, and to which other standard forms can be converted easily. In interactive and 3D graphics a normalized form is a basic requirement, but most will have specific structures with implicit references, i.e. an array index for each primitive that references a given coordinate. This is how OpenGL works for example, and there are many close counterparts in the R ecosystem.
PATH is also a necessary step between other data models that come from or go to explicitly structured coordinate sequence objects. The other entities we identify are segment, edge and arc. Each of these provides an important component of topology, each for different situations.
Note that a path-based structure has no geometric limitations, it is inherently 1-dimensional being confined topologically to a single line but that line may traverse any dimensional space geometrically. If that line is used to describe a polygonal region then it really is confined to a 2-dimensional (or under further constraints) a 3-dimensional geometric space. Polygons are inescably planar, though a more general form of polygon region may be described by collections of triangles.
A vertex is a unique position, and a coordinate is an instance of a vertex. We take pains to have complete separation between geometry and topology. A segment is a straight line between two vertices, and in the usual case it will be a directed segment with real meaning given to which is the first and which is the last vertex. An edge is just like the segment, but is undirected - no meaning is ascribed to which coordinate comes first. In this way the segment is an instance of an edge, just as a coordinate is an instance of a vertex. For an edge to be part of a line or boundary structure it must be directed as a segment, though that same edge might be part of a path winding around a neighbouring polygon or line.
An arc is a path composed of segments, though we haven’t been so sure about the terminology for the directed versus undirected case. The same stuff …
Here we use silicate to decompose a set of neighbouring polygons to arc-node form. This is analagous to the data structures used by the old Arc-INFO and similar systems. It is also the same as TopoJSON forms, though that also adds exact location encoding for optimization and interactive topology purposes.
This is part of ongoing work to define a basis for “non-simple-features”, required by many modelling, graphical and flexible applications, including OpenStreetMap, trajectories in multi-dimensional geometry and other types that don’t fit in modern GIS simplifications.
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
## Linking to GEOS 3.5.1, GDAL 2.2.2, proj.4 4.9.3
## Joining, by = "vertex_"
## Joining, by = "vertex_"
## Joining, by = "vertex_"