Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 0.1.2: workaround for read_GRTS***() functions #61

Merged
merged 8 commits into from
Mar 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
pkgdown/
^\.travis\.yml$
^appveyor\.yml$
^\.zenodo\.json$
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ n2khab is an open source project, maintained by people who care. We are not dire
[new_issue]: https://github.com/inbo/n2khab/issues/new
[website]: https://inbo.github.io/n2khab
[citation]: https://inbo.github.io/n2khab/authors.html
[email]: [email protected]
[email]: mailto:[email protected]

## Code of conduct

Expand Down
25 changes: 25 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"title": "R package n2khab: providing preprocessed reference data for Flemish Natura 2000 habitat analyses",
"description": "The n2khab package is an R package with preprocessing functions and standard reference data, useful for analyses regarding Flemish Natura 2000 habitats and regionally important biotopes (RIBs). URL: <a href=\"https://inbo.github.io/n2khab\">https://inbo.github.io/n2khab</a>.",
"license": "GPL-3.0",
"upload_type": "software",
"access_right": "open",
"version": "0.1.2",
"creators": [
{
"name": "Vanderhaeghe, Floris",
"affiliation": "Research Institute for Nature and Forest",
"orcid": "0000-0002-6378-6229"
},
{
"name": "Westra, Toon",
"affiliation": "Research Institute for Nature and Forest",
"orcid": "0000-0003-2478-9459"
},
{
"name": "Van Calster, Hans",
"affiliation": "Research Institute for Nature and Forest",
"orcid": "0000-0001-8595-8426"
}
]
}
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: n2khab
Title: Providing Preprocessed Reference Data For Flemish Natura 2000 Habitat Analyses
Version: 0.1.1
Version: 0.1.2
Authors@R: c(
person("Floris", "Vanderhaeghe", email = "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-6378-6229")),
person("Toon", "Westra", email = "[email protected]", role = c("aut"), comment = c(ORCID = "0000-0003-2478-9459")),
Expand Down Expand Up @@ -30,7 +30,6 @@ Imports:
assertthat,
dplyr,
forcats,
gdalUtils,
git2rdata (>= 0.2.0),
inborutils (>= 0.1.0.9069),
magrittr,
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ importFrom(dplyr,tribble)
importFrom(dplyr,ungroup)
importFrom(dplyr,vars)
importFrom(forcats,fct_reorder)
importFrom(gdalUtils,gdalsrsinfo)
importFrom(git2rdata,read_vc)
importFrom(inborutils,download_zenodo)
importFrom(magrittr,set_colnames)
Expand Down
14 changes: 10 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# n2khab 0.1.1
## n2khab 0.1.2

## Hotfix
#### Hotfix

- `read_GRTSmh()`, `read_GRTSmh_base4frac()`, `read_GRTSmh_diffres()`: avoided CRS error with more recent GDAL/PROJ.4 installations (#61)

## n2khab 0.1.1

#### Hotfix

- `read_habitatmap_terr()`: fixed non-functioning argument `keep_aq_types=FALSE` (#60)

# n2khab 0.1.0
## n2khab 0.1.0

## Features of the first stable release
#### Features of the first stable release

- core reading and preprocessing functions
- several built-in checklists (among which: `types` and `env_pressures`)
Expand Down
12 changes: 3 additions & 9 deletions R/GRTSmh.R
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,6 @@ convert_base4frac_to_dec <-
#' }
#'
#' @export
#' @importFrom gdalUtils
#' gdalsrsinfo
#' @importFrom raster
#' raster
#' brick
Expand All @@ -337,7 +335,7 @@ read_GRTSmh <-
}
result <- r
}
crs(result) <- gdalsrsinfo("+init=epsg:31370", as.CRS = TRUE)
crs(result) <- "+init=epsg:31370"
return(result)
}

Expand Down Expand Up @@ -427,16 +425,14 @@ read_GRTSmh <-
#' }
#'
#' @export
#' @importFrom gdalUtils
#' gdalsrsinfo
#' @importFrom raster
#' raster
#' crs<-
read_GRTSmh_base4frac <-
function(path = fileman_up("n2khab_data"),
file = "20_processed/GRTSmh_base4frac/GRTSmh_base4frac.tif") {
r <- raster(file.path(path, file))
crs(r) <- gdalsrsinfo("+init=epsg:31370", as.CRS = TRUE)
crs(r) <- "+init=epsg:31370"
return(r)
}

Expand Down Expand Up @@ -577,8 +573,6 @@ read_GRTSmh_base4frac <-
#'
#' @export
#' @importFrom stringr str_c
#' @importFrom gdalUtils
#' gdalsrsinfo
#' @importFrom sf
#' read_sf
#' st_crs<-
Expand Down Expand Up @@ -613,7 +607,7 @@ read_GRTSmh_diffres <-
str_c("GRTSmh_diffres.",
level, ".tif")))
names(r) <- str_c("level", level)
crs(r) <- gdalsrsinfo("+init=epsg:31370", as.CRS = TRUE)
crs(r) <- "+init=epsg:31370"
r

}
Expand Down