locateGATshapefile: Locate GAT Shapefile

View source: R/locateGATshapefile.R

locateGATshapefileR Documentation

Locate GAT Shapefile

Description

This function opens a window that asks the user to select a shapefile for aggregation. The file selection window looks like this.

locateGATshapefile.png

Figure: Dialog to select your shapefile

Select your folder and file and click Open. Clicking Cancel on this window will trigger a flag to cancel GAT.

Usage

locateGATshapefile(
  myfile = "",
  step = 1,
  msg = "",
  myprogram = "GAT",
  bgcol = "lightskyblue3",
  buttoncol = "cornflowerblue"
)

Arguments

myfile

String denoting default file name and location to open.

step

Step number to print in title bar. Default is 1.

msg

String denoting your message to display in the status bar.

myprogram

String denoting the program name. GAT is the default.

bgcol

Text string containing UI background color.

buttoncol

Text string containing UI button color.

Details

This function returns a list with the following elements.

userin: The full name and path for the shapefile, without the extension.

filein: The name of the shapefile, without the extension.

pathin: The full path for the shapefile.

The window may be hidden behind other windows. If so, minimize or close the other windows or click on it to bring it to the front.

Examples


if (interactive()) {
# navigate to and select a shapefile
locateGATshapefile()

# provide a default location to start
locateGATshapefile(
  msg = "Select your shapefile",
  myfile = getwd()
)

}


ajstamm/gatpkg documentation built on Nov. 23, 2023, 9:44 a.m.