Skip to content

Commit

Permalink
version 2.1-0
Browse files Browse the repository at this point in the history
  • Loading branch information
blasee authored and cran-robot committed Apr 28, 2017
1 parent d7652e5 commit ebd8ccf
Show file tree
Hide file tree
Showing 18 changed files with 255 additions and 173 deletions.
30 changes: 21 additions & 9 deletions DESCRIPTION
@@ -1,21 +1,33 @@
Package: fetchR
Type: Package
Title: Calculate Wind Fetch in R
Version: 2.0-0
Date: 2017-03-16
Title: Calculate Wind Fetch
Version: 2.1-0
Date: 2017-04-28
Authors@R: person("Blake", "Seers", role = c("aut", "cre"),
email = "blake.seers@gmail.com")
Imports: rgdal, sp, methods, rgeos, plotKML
Imports: rgdal, sp, methods, rgeos, plotKML, utils
Suggests: knitr, ggplot2, maps, rmarkdown
URL: https://github.com/blasee/fetchR
URL: https://cran.r-project.org/package=fetchR
BugReports: https://github.com/blasee/fetchR/issues
Description: Wind fetch is the unobstructed length of water over which wind can blow from a certain direction. Averaging the wind fetch for numerous directions at the same location is therefore a reasonable measure of the overall wind exposure for a specific marine location. However, this process of calculating wind fetch can be extremely time-consuming and tedious, particularly if a large number of fetch vectors are required at many locations. The fetchR package calculates wind fetch with ease and summarises the information efficiently. There are also plot methods to help visualise the wind exposure at the various locations, and methods to output the fetch vectors to a KML file for further investigation.
Description: Wind fetch is the unobstructed length of water over which wind can
blow from a certain direction. The wind fetch is typically calculated for many directions
around the compass rose for a given location, which can then be incorporated
into a larger model (such as the InVEST coastal vulnerability model;
<http://data.naturalcapitalproject.org/invest-releases/documentation/2_2_0/coastal_vulnerability.html>),
or simply averaged for a reasonable measure of
the overall wind exposure for a specific marine location. The process of calculating
wind fetch can be extremely time-consuming and tedious, particularly if a large
number of fetch vectors are required at many locations. The 'fetchR' package
calculates wind fetch and summarises the information efficiently. There are
also plot methods to help visualise the wind exposure at the various
locations, and methods to output the fetch vectors to a KML file for further
investigation.
License: GPL-2
RoxygenNote: 5.0.1
RoxygenNote: 6.0.1
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2017-03-16 03:16:48 UTC; blake
Packaged: 2017-04-28 00:14:06 UTC; blake
Author: Blake Seers [aut, cre]
Maintainer: Blake Seers <blake.seers@gmail.com>
Repository: CRAN
Date/Publication: 2017-03-16 08:44:13
Date/Publication: 2017-04-28 07:16:21 UTC
34 changes: 17 additions & 17 deletions MD5
@@ -1,22 +1,22 @@
ef6db797f6a3e8cdb594eff3542feb9b *DESCRIPTION
927344e99e5407969f6097b0029cfb4e *DESCRIPTION
f7035f55b71ca388e3017af5dbb18534 *NAMESPACE
ba69ea74abc5e02cff513134cb46f5d5 *NEWS.md
28b4c3aacc0acf0660b76a9369ccd6a4 *R/fetch.R
896110d0a24fa45a1b57beb41b61c11d *R/fetch_class.R
6aabba8ff99012f9592da2ddaa36bb20 *NEWS.md
ed5c5c63c445c477d0198849a04ca891 *R/fetch.R
fbec0df371b9b8a75af3e4bf98610c10 *R/fetch_class.R
7019c65cd2dcdb55966246b9e3e548ac *R/internals.R
e67bc77df31a0df8ee71a30730506a25 *README.md
85fcbcf96d0cb9ff81b87b2e80aea143 *build/vignette.rds
3112c938ff91424044883239dc8f10d1 *README.md
6159b19105260d18f1baa7ade7a1463b *build/vignette.rds
42017e7e90fbba0cec938b47dc909f5b *inst/doc/introduction-to-fetchR.R
eb176d82085b0b2879af30ff4ab2735b *inst/doc/introduction-to-fetchR.Rmd
48892d74a459ae32397bc7be76490820 *inst/doc/introduction-to-fetchR.html
fc4bcd4453831fec89367987d5f8e1b2 *man/Fetch-class.Rd
bb68fe1fd60c1c71dadf5f4446b3211f *man/fetch.Rd
8d3f5fc32cf65ecad417859fdebcd96c *man/fetchR.Rd
f39536ab7c798198e5efe78fc870a159 *man/kml-Fetch-method.Rd
75067972a951fcfec025e8896ef9ea63 *man/plot-Fetch-missing-method.Rd
c33c2b8dd456d0f7d7998d3696f94486 *man/proj4string-Fetch-method.Rd
4533727353390175e1983939bf554cd5 *man/spTransform-Fetch-CRS-method.Rd
559584339907eea8ba2ac15fdbd0d88c *man/summary-Fetch-method.Rd
5212ff6ff078405b592217fb63fddcb8 *inst/doc/introduction-to-fetchR.Rmd
42723a6f3011847042526aca6ddcfee1 *inst/doc/introduction-to-fetchR.html
e56e91cd5d7abc36d823cb82fbf798dd *man/Fetch-class.Rd
2c5eae2099bce14e79b633effb44c934 *man/fetch.Rd
5913756a3e3863bc2ee7dd9f7899e548 *man/fetchR.Rd
9266b77d82b56e4af6fa4d7c0c02430b *man/kml-Fetch-method.Rd
7610ba918976eb2a548fcda406a6a181 *man/plot-Fetch-missing-method.Rd
e8ea1e5e17ad9c51cc580f3072480039 *man/proj4string-Fetch-method.Rd
76b136e8a2d50bc5f4c32a360f15cbce *man/spTransform-Fetch-CRS-method.Rd
f765f34804bcd9eba1b6fa42be72a62c *man/summary-Fetch-method.Rd
c3598ada541fc0818a34d1b9908779ad *vignettes/data/my_fetch.RData
4ea7c1be9601935071fcf3a9592b4c0e *vignettes/figures/chetwode.png
deb2d7c49f87c70d798e9c56a756b7ba *vignettes/figures/foveaux.png
Expand All @@ -25,4 +25,4 @@ deb2d7c49f87c70d798e9c56a756b7ba *vignettes/figures/foveaux.png
573b209591ba43dc071477724573e824 *vignettes/figures/lat_lon.png
1444d191a9adefc8a63ecf4b4605af09 *vignettes/figures/nz_fetch.png
9eaa2a4c694597fb295bb66e0b14b70e *vignettes/figures/proj.png
eb176d82085b0b2879af30ff4ab2735b *vignettes/introduction-to-fetchR.Rmd
5212ff6ff078405b592217fb63fddcb8 *vignettes/introduction-to-fetchR.Rmd
19 changes: 16 additions & 3 deletions NEWS.md
@@ -1,9 +1,22 @@
# fetchR 2.1-0

## Minor changes

* Site names are automatically read from the data associated with the shapefile.
The names have to be in a column with a name matching the regular expression;
"^[Nn]ames{0,1}$".

* Check out the
[online web application](http://windfetch.cer.auckland.ac.nz/) for **fetchR**.

* Use `on.exit` to close the KML file connection in `kml,Fetch` method.

# fetchR 2.0-0

## Major changes

* **fetchR** is now generalised to incorporate `SpatialPolyons` representing any
marine location on Earth (#6). As a result, **fetchR* 2.0 is no longer limited
marine location on Earth (#6). As a result, **fetchR** 2.0 is no longer limited
to calculating wind fetch within New Zealand coastal areas.

### Rewrite the entire algorithm for calculating wind fetch.
Expand All @@ -15,8 +28,8 @@ vectors at their maximum distance.
polygons, are calculated with the `rgeos::gIntersection` function as opposed to
the slow, iterative algorithm used by the package's predecessors.

* Computation times are dramatically decreased.
* Computation times have dramatically decreased.

## Minor changes

Create a vignette for the package; `vignette("introduction-to-fetchR")`.
Create a vignette for the package; `vignette("introduction-to-fetchR")`.
14 changes: 11 additions & 3 deletions R/fetch.R
Expand Up @@ -30,8 +30,11 @@
#' not 'm'.
#' @param n_directions numeric. The number of fetch vectors to calculate per
#' quadrant (default 9).
#' @param site_names character vector of the site names. If missing, default
#' names are created ('Site 1', 'Site 2', ...).
#' @param site_names character vector of the site names. If missing, the site
#' names are taken from a column of the data associated with
#' \code{site_layer} matching the regular expression
#' \code{^[Nn]ames{0,1}}. If there is no such column, then
#' default names are created ('Site 1', 'Site 2', ...).
#' @param quiet logical. Suppress diagnostic messages? (Default \code{FALSE}).
#'
#' @return Returns a \code{\link{Fetch}} object.
Expand Down Expand Up @@ -168,7 +171,12 @@ fetch = function(polygon_layer, site_layer, max_dist = 300, n_directions = 9,
site_names = paste("Site", seq_along(site_layer))
}
} else {
site_names = paste("Site", seq_along(site_layer))
if (any(grepl("^[Nn]ames{0,1}$", names(site_layer)))){
name_col = grep("^[Nn]ames{0,1}$", names(site_layer))
site_names = as.character(data.frame(site_layer)[, name_col[[1]]])
} else {
site_names = paste("Site", seq_along(site_layer))
}
}

quiet = as.logical(quiet[1])
Expand Down

0 comments on commit ebd8ccf

Please sign in to comment.