create_Points {CCAMLRGIS} | R Documentation |
Create Points
Description
Create Points to display point locations. Buffering points may be used to produce bubble charts.
Usage
create_Points(
Input,
NamesIn = NULL,
Buffer = 0,
Clip = FALSE,
SeparateBuf = TRUE
)
Arguments
Input |
input dataframe. If Latitude, Longitude, Variable 1, Variable 2, ... Variable x. |
NamesIn |
character vector of length 2 specifying the column names of Latitude and Longitude fields in
the
|
Buffer |
numeric, radius in nautical miles by which to expand the points. Can be specified for each point (as a numeric vector). |
Clip |
logical, if set to TRUE, polygon parts (from buffered points) that fall on land are removed (see Clip2Coast). |
SeparateBuf |
logical, if set to FALSE when adding a |
Value
Spatial object in your environment.
Data within the resulting spatial object contains the data provided in the Input
plus
additional "x" and "y" columns which corresponds to the projected points locations
and may be used to label points (see examples).
To see the data contained in your spatial object, type: View(MyPoints)
.
See Also
create_Lines
, create_Polys
, create_PolyGrids
,
create_Stations
, create_Pies
, add_Legend
.
Examples
# For more examples, see:
# https://github.com/ccamlr/CCAMLRGIS#create-points
#Simple points with labels
MyPoints=create_Points(Input=PointData)
plot(st_geometry(MyPoints))
text(MyPoints$x,MyPoints$y,MyPoints$name,adj=c(0.5,-0.5),xpd=TRUE)