Waterdist | R Documentation |
Calculate a distance matrix for a set of points based on in-water distances, using a raster-based approach
Waterdist(
Water_map,
Points,
Latitude_column,
Longitude_column,
PointID_column,
Points_crs = 4326,
Water_map_transitioned = NULL,
Calculation_crs = 32610,
Grid_size = 75
)
Water_map |
Object of class sf representing a map of all waterways in your region of interest |
Points |
A dataframe of points with latitude and longitude |
Latitude_column |
The unquoted name of the column in the |
Longitude_column |
The unquoted name of the column in the |
PointID_column |
The unquoted name of the column in the |
Points_crs |
Coordinate reference system for your |
Water_map_transitioned |
A rasterized, transitioned, and geo-corrected version of the water map. This is optional to save time if you will be running this function frequently with the same base map. |
Calculation_crs |
Coordinate reference system used for the calculation. If a latitude/longitude system are used, errors may be returned since some calculations assume a planar surface. Defaults to |
Grid_size |
Grid size (in meters) used to rasterize the map. Defaults to 75. |
Distance matrix.
Maptransitioner
Pointmover
library(tibble)
Points <- tibble(Latitude = c(38.23333, 38.04813, 38.05920,
37.94900, 38.23615, 38.47387),
Longitude = c(-121.4889, -121.9149, -121.8684,
-121.5591, -121.6735, -121.5844),
ID = c("EMP NZP02", "FMWT 508", "FMWT 513",
"FMWT 915", "FMWT 723", "FMWT 796"))
## Not run:
distance<-Waterdist(Water_map = spacetools::Delta, Points = Points, Latitude_column = Latitude,
Longitude_column = Longitude, PointID_column = ID)
# Including a pre-transitioned map to save time.
# See Maptransitioner for creating this pre-transitioned map.
distance<-Waterdist(Water_map = spacetools::Delta, Points = Points, Latitude_column = Latitude,
Longitude_column = Longitude, PointID_column = ID,
Water_map_transitioned = Delta_transitioned)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.