Description Usage Arguments Value Author(s)
View source: R/addIslands.sp_pkg.R
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.
1 | addIslands.sp(newIslands, currentIslands, polys)
|
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. |
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)
Tyler J Tran, tylerjtran@gmail.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.