create_Points: Create Points that are compatible with CCAMLR online GIS

Description Usage Arguments Value Examples

Description

Create Points that are compatible with CCAMLR online GIS

Usage

1
2
create_Points(Input, OutputFormat = "ROBJECT", OutputName = NULL,
  Buffer = 0, Clip = FALSE)

Arguments

Input

the name of the input data as a .csv file or an R dataframe. If .csv input then ensure this file is in your set work directory in quotes e.g. "DataFile.csv". The columns of the input should be in the following order: Name, Latitude,Longitude

OutputFormat

can be an R object or ESRI Shapefile. R object is specified as "ROBJECT" and returns a SpatialPointsDataFrame to your R work enviornment (if this parameter is not specified this is the default). The ESRI Shapefile output is specified as "SHAPEFILE" will write an ESRI Shapefile to your work directory or set file path.

OutputName

if "SHAPEFILE" format is specified then supply the name of the output shapefile in quotes e.g."MyShape", the default is NULL and assumes an "ROBJECT" format

Buffer

is the value in nautical miles to apply to the line. The default value is 0, assuming no Buffer

Clip

is TRUE will clip a polygon that intersect with the coastline to remove the land and keep only the ocean area, the default is set to FLASE which assumes no clipping is required

Value

Returns points with attributed "Name", "Lat" and "Long". If a buffer is applied then an additional attribute of "AreaKm2" is also returned. This planimetric area value is calculated using the gArea function from the sp package

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## specify the name of the points

Name <- c("Point_1","Point_2","Point_3")

## specify the Latitude coordinates in decimal degrees

Lat<- c(-70.2,-70.1,-69.9)

## specify the Longitude coordinates in decimal degrees

Lon <- c(-160,-161,-159)

## bind information together into a dataframe 

Coords<- data.frame(Name=Name,Lat=Lat,Lon=Lon)

## create points 

New_Points <- create_Points(Coords)

lucymerobinson/CCAMLRGIS documentation built on May 14, 2019, 8:59 a.m.