Skip to contents

Work with OD data

od2line()
Convert origin-destination data to spatial lines
od2odf()
Extract coordinates from OD data
od_aggregate_from()
Summary statistics of trips originating from zones in OD data
od_aggregate_to()
Summary statistics of trips arriving at destination zones in OD data
od_coords()
Create matrices representing origin-destination coordinates
od_coords2line()
Convert origin-destination coordinates into desire lines
od_id_szudzik() od_id_max_min() od_id_character()
Combine two ID values to create a single ID number
od_oneway()
Aggregate od pairs they become non-directional
od_to_odmatrix()
Convert origin-destination data from long to wide format
odmatrix_to_od()
Convert origin-destination data from wide to long format
points2flow()
Convert a series of points into geographical flows
points2odf()
Convert a series of points into a dataframe of origins and destinations

Work with (desire) lines

angle_diff()
Calculate the angular difference between lines and a predefined bearing
geo_toptail()
Clip the first and last n metres of SpatialLines
is_linepoint()
Identify lines that are points
line2df()
Convert geographic line objects to a data.frame with from and to coords
line2points() line2pointsn() line2vertices()
Convert a spatial (linestring) object to points
line_bearing()
Find the bearing of straight lines
line_breakup()
Break up line objects into shorter segments
line_midpoint()
Find the mid-point of lines
line_segment()
Divide sf LINESTRING objects into regular segments
line_via()
Add geometry columns representing a route via intermediary points
mats2line()
Convert 2 matrices to lines
n_vertices()
Retrieve the number of vertices in sf objects
onewaygeo()
Aggregate flows so they become non-directional (by geometry - the slow way)
points2line()
Convert a series of points, or a matrix of coordinates, into a line
toptail_buff()
Clip the beginning and ends of sf LINESTRING objects

Work with and analyse routes

route_average_gradient()
Return average gradient across a route
route_rolling_average()
Return smoothed averages of vector
route_rolling_diff()
Return smoothed differences between vector values
route_rolling_gradient()
Calculate rolling average gradient from elevation data at segment level
route_sequential_dist()
Calculate the sequential distances between sequential coordinate pairs
route_slope_matrix()
Calculate the gradient of line segments from a matrix of coordinates
route_slope_vector()
Calculate the gradient of line segments from distance and elevation vectors

Routing

route()
Plan routes on the transport network
route_dodgr()
Route on local data using the dodgr package
route_osrm()
Plan routes on the transport network using the OSRM server

Work with nodes

geo_code()
Convert text strings into points on the map

Route network functions

gsection()
Function to split overlapping SpatialLines into segments
islines()
Do the intersections between two geometries create lines?
overline() overline2()
Convert series of overlapping lines into a route network
rnet_breakup_vertices()
Break up an sf object with LINESTRING geometry.
rnet_group()
Assign segments in a route network to groups

Geographic functions

bbox_scale()
Scale a bounding box
geo_bb()
Flexible function to generate bounding boxes
geo_bb_matrix()
Create matrix representing the spatial bounds of an object
quadrant()
Split a spatial object into quadrants

Get transport data

read_table_builder()
Import and format Australian Bureau of Statistics (ABS) TableBuilder files

Example data