msn2Shape: Convert a Minimum spanning Network or Tree to Shapefile

Description Usage Arguments Details Value Author(s) See Also Examples

Description

A helper function to convert a minimum spanning tree or network into shapefile format.

Usage

1
msn2Shape(msn, lats, dist = NULL)

Arguments

msn

a minimum spanning tree or network (binary matrix)

lats

a matrix or data frame with the latitude and longitude of the sites as the first two columns respectively

dist

Optional argument to include distance values in final output; if wanted, a distance matrix (lower triangle) with the localities in the same order as in the MSN are required

Details

This function will take a minimum spanning tree or network object, along with the georeferenced locations of the sites, and convert it into a shapefile for use with GIS. The msn argument requires a minimu spanning tree or network object, and the lat argument requires some form of location for each of the points, typically a matrix with latitude and longitude columns respectively.

Value

A shapefile which can be output using the write.shapefile function for use with a GIS program.

Author(s)

Matthew Vavrek

See Also

lats2Shape for a function to convert a lat/long table to a shapefile

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
#import both fdata.lats and fdata.mat
data(fdata.lats)
data(fdata.mat)
fdata.dist<-dino.dist(fdata.mat)
fdata.mst<-dino.mst(fdata.dist)
shape.mst<-msn2Shape(fdata.mst, fdata.lats)
write.shapefile(shape.mst, file='/path/to/write/mst')

## End(Not run)

fossil documentation built on March 23, 2020, 5:06 p.m.