Package index
Construction & conversion
At the core of the package lies the sfnetwork
class to represent spatial networks. There are several ways to construct instances of this class, and to convert them to other classes.
-
sfnetwork()
- Create a sfnetwork
-
as_sfnetwork()
- Convert a foreign object to a sfnetwork
-
create_from_spatial_lines()
- Create a spatial network from linestring geometries
-
create_from_spatial_points()
- Create a spatial network from point geometries
-
play_geometric()
- Create random spatial networks
-
dodgr_to_sfnetwork()
sfnetwork_to_dodgr()
- Conversion between dodgr streetnets and sfnetworks
-
nb_to_sfnetwork()
sfnetwork_to_nb()
- Conversion between neighbor lists and sfnetworks
-
as.linnet.sfnetwork()
- Convert a sfnetwork into a linnet
Analysis
The package enables an integrated analysis workflow that combines tidygraph
and sf
. On top of this, it extends the functionalities of those two packages with a set of analytical functions specific for spatial network analysis.
-
st_network_bbox()
- Compute the bounding box of a spatial network
-
st_network_blend()
- Blend spatial points into a spatial network
-
st_network_cost()
st_network_distance()
- Compute a cost matrix of a spatial network
-
st_network_faces()
- Extract the faces of a spatial network
-
st_network_iso()
- Compute isolines around nodes in a spatial network
-
st_network_join()
- Join two spatial networks based on equality of node geometries
-
st_network_paths()
- Find shortest paths between nodes in a spatial network
-
st_network_travel()
- Find the optimal route through a set of nodes in a spatial network
-
st_project_on_network()
- Project spatial points on a spatial network
-
centrality_straightness()
- Compute spatial centrality measures
-
node_is_pseudo()
node_is_dangling()
- Query spatial node types
-
node_intersects()
node_is_disjoint()
node_touches()
node_is_within()
node_equals()
node_is_covered_by()
node_is_within_distance()
node_is_nearest()
- Query nodes with spatial predicates
-
edge_azimuth()
edge_circuity()
edge_length()
edge_displacement()
edge_segment_count()
- Query spatial edge measures
-
edge_intersects()
edge_is_disjoint()
edge_touches()
edge_crosses()
edge_is_within()
edge_contains()
edge_contains_properly()
edge_overlaps()
edge_equals()
edge_covers()
edge_is_covered_by()
edge_is_within_distance()
edge_is_nearest()
- Query edges with spatial predicates
-
group_spatial_dbscan()
- Group nodes based on spatial distance
-
to_spatial_contracted()
to_spatial_directed()
to_spatial_explicit()
to_spatial_implicit()
to_spatial_mixed()
to_spatial_neighborhood()
to_spatial_reversed()
to_spatial_shortest_paths()
to_spatial_simple()
to_spatial_smooth()
to_spatial_subdivision()
to_spatial_subset()
to_spatial_transformed()
to_spatial_unique()
- Morph spatial networks into a different structure
-
bind_spatial_nodes()
bind_spatial_edges()
- Add nodes or edges to a spatial network.
Utilities
The package exports different kind of utility and internal functions that are meant to make spatial network analysis smoother, and fitting both into tidyverse and non-tidyverse workflows.
-
node_data()
edge_data()
- Extract the node or edge data from a spatial network
-
node_ids()
edge_ids()
- Extract all node or edge indices from a spatial network
-
nearest_nodes()
nearest_edges()
- Extract the nearest nodes or edges to given spatial features
-
nearest_node_ids()
nearest_edge_ids()
- Extract the indices of nearest nodes or edges to given spatial features
-
make_edges_directed()
- Convert undirected edges into directed edges based on their geometries
-
make_edges_mixed()
- Make some edges directed and some undirected
-
make_edges_explicit()
- Construct edge geometries for spatially implicit networks
-
make_edges_implicit()
- Drop edge geometries of spatially explicit networks
-
make_edges_follow_indices()
- Match the direction of edge geometries to their specified incident nodes
-
make_edges_valid()
- Match edge geometries to their incident node locations
Network cleaning
These functions are the internal workers behind the spatial morphers that are dedicted to network cleaning. They are exported to make it possible to do network cleaning outside of tidyverse workflows.
-
contract_nodes()
- Contract groups of nodes in a spatial network
-
simplify_network()
- Simplify a spatial network
-
smooth_pseudo_nodes()
- Smooth pseudo nodes
-
subdivide_edges()
- Subdivide edges at interior points
Internals
These are internal functions that are not meant to be called directly by users. They are exported such that developers aiming to extend the package can use them.
-
evaluate_weight_spec()
- Specify edge weights in a spatial network
-
evaluate_node_query()
- Query specific node indices from a spatial network
-
evaluate_edge_query()
- Query specific edge indices from a spatial network
-
dual_weights()
- Specify dual edge weights
-
is_sfnetwork()
is.sfnetwork()
- Check if an object is a sfnetwork
-
sf_attr()
- Query sf attributes from the active element of a sfnetwork
-
st_duplicated()
- Determine duplicated geometries
-
st_match()
- Geometry matching
-
st_round()
- Rounding of geometry coordinates
-
validate_network()
- Validate the structure of a sfnetwork
-
wrap_igraph()
- Run an igraph function on an sfnetwork object