addIslands.sp: Adding new islands to global islands dataset

Description Usage Arguments Value Author(s)

View source: R/addIslands.sp_pkg.R

Description

This function adds new islands to the global island dataset, and assigns unique numeric IDs to the new islands based off the ID system of the old islands.

Usage

1
addIslands.sp(newIslands, currentIslands, polys)

Arguments

newIslands

Data frame of new islands, with a row for each new island. Must have columns called 'lat' and 'long' but no other requirements.

currentIslands

SpatialPolygonsDataFrame of current global island dataset. MUST have numeric ID column in attributes named 'uniqueID'. Unprojected lat/long.

polys

SpatialPolygonsDataFrame of all land on earth (GADM shapefile, for example). Unprojected lat/long.

Value

Returns spatialPolygonsDataFrame of newIslands. This SPDF can be merged with currentIslands easily using rbind if the columns are the same...see newCurrentIslands <- rbind(currentIslands, polys2add, makeUniqueIDs = T)

Author(s)

Tyler J Tran, tylerjtran@gmail.com


mrhelmus/ieco documentation built on May 23, 2019, 7:37 a.m.