Skip to content

Commit 590ace3

Browse files
committed
Merge branch 'boshek-master'
2 parents b3e5d82 + 89e0a08 commit 590ace3

12 files changed

Lines changed: 104 additions & 4 deletions

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Package: bcmaps
22
Title: Map layers for British Columbia
3-
Version: 0.10.1
3+
Version: 0.11.0
44
Authors@R: c(person("Andy", "Teucher", email = "andy.teucher@gov.bc.ca",
55
role = c("aut", "cre")), person("Stephanie", "Hazlitt", email = "stephanie.hazlitt@gov.bc.ca",
6-
role = "aut"),
6+
role = "aut"), person("Sam", "Albers", email = "sam.albers@gov.bc.ca", role = "aut"),
77
person("Province of British Columbia", role="cph"))
88
Description: Various layers of B.C., such as administrative boundaries, natural
99
resource management boundaries, etc. All layers are available as 'sp' objects,

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# bcmaps 0.11.0
2+
3+
* Added `hydrozones` dataset.
4+
15
# bcmaps 0.10.1
26

37
* Fixed ring self-intersctions in `bc_bound_hres` and `airzones` (#13)

R/hydrozones.R

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Copyright 2016 Province of British Columbia
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and limitations under the License.
12+
#
13+
#' Hydrologic Zone Boundaries of British Columbia
14+
#'
15+
#' Hydrologic zone boundaries were digitized from 1:600,000 hardcopy maps.
16+
#' Coastline & islands were copied from 1:50K BC WSA. Linework updated January 2003.
17+
#' Polygons & Regions built September 20, 2004. Boundaries accuracy is +/- 1 kilometre based
18+
#' on hydrologic maps, graphical plots, & previous definitions.
19+
#'
20+
#'
21+
#' @format Zones that represent areas of homogeneous hydrologic and geomorphological characteristics
22+
#'
23+
#'
24+
#' @source Original data from
25+
#' \href{https://catalogue.data.gov.bc.ca/dataset/hydrology-hydrologic-zone-boundaries-of-british-columbia}{DataBC},
26+
#' under the
27+
#' \href{http://www.data.gov.bc.ca/local/dbc/docs/license/OGL-vbc2.0.pdf}{Open
28+
#' Government License - British Columbia}.
29+
30+
"hydrozones"

README.Rmd

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ install_github("bcgov/bcmaps", build_vignettes = TRUE)
4747

4848
### Usage
4949

50-
At the moment, there are fourteen layers available:
50+
At the moment, there are fifteen layers available:
5151

5252
- `bc_bound`: Coarse provincial boundary of British Columbia (1:7.5M scale).
5353

@@ -81,6 +81,8 @@ At the moment, there are fourteen layers available:
8181

8282
- `water_precincts`: Boundaries of British Columbia's Water Management Precincts.
8383

84+
- `hydrozones`: Hydrologic Zone Boundaries of British Columbia.
85+
8486
To load any of them, simply type `data(layer_name)`, where `layer_name` is the
8587
name of the layer of interest. Then you can use the data as you would any `sp`
8688
object.
@@ -169,6 +171,8 @@ The data and code in this repository is licensed under multiple licenses.
169171

170172
- Source data in `/data-raw/watershed_boundaries` is licensed under the [Open Government License - British Columbia version 2.0](http://www2.gov.bc.ca/gov/content?id=A519A56BC2BF44E4A008B33FCF527F61). See LICENSE.OGL-vbc2.0.pdf in the appropriate directory.
171173

174+
- Source data in `/data-raw/hydrozones` is licensed under the [Open Government License - British Columbia version 2.0](http://www2.gov.bc.ca/gov/content?id=A519A56BC2BF44E4A008B33FCF527F61). See LICENSE.OGL-vbc2.0.pdf in the appropriate directory.
175+
172176
- Source data in `/data-raw/canvec_15M_hydro` and `/data-raw/canvec_5M_hydro` is licensed under the [Open Government License - Canada version 2.0](http://open.canada.ca/en/open-government-licence-canada). See LICENSE.Canada-OGL-2.0 in the appropriate directory.
173177

174178
- Source data in `/data-raw/gw_aquifers`, `/data-raw/water_districts` and `/data-raw/water_precincts` is licensed under the [Open Government License - British Columbia version 2.0](http://www2.gov.bc.ca/gov/content?id=A519A56BC2BF44E4A008B33FCF527F61). See LICENSE.OGL-vbc2.0.pdf in the appropriate directory.

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ install_github("bcgov/bcmaps", build_vignettes = TRUE)
2727

2828
### Usage
2929

30-
At the moment, there are fourteen layers available:
30+
At the moment, there are fifteen layers available:
3131

3232
- `bc_bound`: Coarse provincial boundary of British Columbia (1:7.5M scale).
3333

@@ -61,6 +61,8 @@ At the moment, there are fourteen layers available:
6161

6262
- `water_precincts`: Boundaries of British Columbia's Water Management Precincts.
6363

64+
- `hydrozones`: Hydrologic Zone Boundaries of British Columbia.
65+
6466
To load any of them, simply type `data(layer_name)`, where `layer_name` is the name of the layer of interest. Then you can use the data as you would any `sp` object.
6567

6668
A couple of simple examples:
@@ -161,6 +163,8 @@ The data and code in this repository is licensed under multiple licenses.
161163

162164
- Source data in `/data-raw/watershed_boundaries` is licensed under the [Open Government License - British Columbia version 2.0](http://www2.gov.bc.ca/gov/content?id=A519A56BC2BF44E4A008B33FCF527F61). See LICENSE.OGL-vbc2.0.pdf in the appropriate directory.
163165

166+
- Source data in `/data-raw/hydrozones` is licensed under the [Open Government License - British Columbia version 2.0](http://www2.gov.bc.ca/gov/content?id=A519A56BC2BF44E4A008B33FCF527F61). See LICENSE.OGL-vbc2.0.pdf in the appropriate directory.
167+
164168
- Source data in `/data-raw/canvec_15M_hydro` and `/data-raw/canvec_5M_hydro` is licensed under the [Open Government License - Canada version 2.0](http://open.canada.ca/en/open-government-licence-canada). See LICENSE.Canada-OGL-2.0 in the appropriate directory.
165169

166170
- Source data in `/data-raw/gw_aquifers`, `/data-raw/water_districts` and `/data-raw/water_precincts` is licensed under the [Open Government License - British Columbia version 2.0](http://www2.gov.bc.ca/gov/content?id=A519A56BC2BF44E4A008B33FCF527F61). See LICENSE.OGL-vbc2.0.pdf in the appropriate directory.

data-raw/hydrozones/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
HYD_BC_H_Z
2+
README.txt
3+
contents_of_order.txt
4+
licence.txt
5+
HYD_BC_H_Z.html
766 KB
Binary file not shown.
198 KB
Binary file not shown.

data-raw/hydrozones/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## BC Hydrologic Zones
2+
3+
The file `BC_hydrologic_zones.zip` contains the British Columbia Hydrologic Zone Boundaries, downloaded from [DataBC](https://catalogue.data.gov.bc.ca/dataset/hydrology-hydrologic-zone-boundaries-of-british-columbia) under the ([Open Government License - British Columbia](http://www.data.gov.bc.ca/local/dbc/docs/license/OGL-vbc2.0.pdf)).

data-raw/process_hydrozones.R

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright 2017 Province of British Columbia
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and limitations under the License.
12+
13+
library("sp")
14+
library("rgdal")
15+
library("devtools")
16+
17+
hydrologic_zip <- "data-raw/hydrozones/BC_hydrologic_zones.zip"
18+
19+
unzip(hydrologic_zip , exdir = "data-raw/hydrozones")
20+
21+
hydrozones <- readOGR(dsn = "data-raw/hydrozones/HYD_BC_H_Z",
22+
layer = "HYD_BC_H_Z_polygon", stringsAsFactors = FALSE)
23+
24+
hydrozones <- spTransform(hydrozones, "+init=epsg:3005")
25+
26+
use_data(hydrozones, overwrite = TRUE, compress = "xz")

0 commit comments

Comments
 (0)