read_points: read georeferenced points

View source: R/read_points.R

read_pointsR Documentation

read georeferenced points

Description

read georeferenced points

Usage

read_points(x,type, delimiter,id, lat, long)

Arguments

x

a valid pathfile to the points

type

the specific filetype to be readed. Accepted types: Shape files: "shp" txt files: "txt"

delimiter

a character to delimite the columns of the text file with the coordinates

id

Only aplicable if the type is csv or txt. The name of the field containing sites id

lat

Only aplicable if the type is csv or txt. The name of the field containing sites latitude coordinates

long

Only aplicable if the type is csv or txt. The name of the field containing sites longitude coordinates

Examples

## Not run: 
points.file <- system.file("extdata/pnts.shp", package="landscapeDecoupler")
p <- read_points(points.file,type="shp")
plot(landscapeDecoupler::r)
plot(p, add=TRUE)
text(p, labels=p$id)

## End(Not run)

wilsonfrantine/landscapeDecoupler documentation built on Oct. 31, 2024, 3:45 a.m.