spatial_to_coords: Covert .kml or .shp to gps coordinates

View source: R/scan_pts.R

spatial_to_coordsR Documentation

Covert .kml or .shp to gps coordinates

Description

This function takes a kml or other shapefile, transforms them to WGS84, and export GPS coordinates

Usage

spatial_to_coords(in_file, csv_out = NULL, proj = 32616)

Arguments

in_file

path to a .KML or .SHP containing points

csv_out

path to a .CSV or .TXT to output points. If not provided, an interactive file chooser will be used

proj

epsg projection for output. Defaults to 32316 (UTM 16N)

Examples

in_file = 'R:/landscape_ecology/test.shp'
out_file = 'R:/landscape_ecology/output.csv'
spatial_to_coords(in_file, out_file)

# Use an interactive file chooser
in_file = file.choose()
out_file = file.choose()
spatial_to_coords(in_file, out_file)


jbcannon/landecoutils documentation built on July 16, 2025, 10:17 p.m.