geo2smoof

Build Status Linux Build Status Windows Coverage Status

set.seed(123)
knitr::opts_chunk$set(cache = TRUE, collapse = FALSE, warning = FALSE, error = FALSE)
library(geo2smoof)

Convert a elevation RasterLayer from the package raster or an Google Maps Elevation API Call to a function that you can optimize.

Installation

devtools::install_github("jakob-r/geo2smoof")
library(geo2smoof)
# list available countries
# raster::getData('ISO3')
alt = raster::getData('alt', country='JAM')
sf = convertRasterLayerToSmoof(raster.layer = alt)
plot2DNumeric(sf, render.levels = TRUE)
# find the highest point with optim()
optim(c(140,80), fn = function(...) -1 * sf(...), )


jakob-r/geo2smoof documentation built on May 14, 2019, 8:21 a.m.