Skip to content

Commit

Permalink
Merge pull request #4 from inbo/2024.1
Browse files Browse the repository at this point in the history
v 2024.1
  • Loading branch information
ThierryO authored May 16, 2024
2 parents 66abfd0 + af8a670 commit 2565019
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 9 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,11 @@ Having both the code and the data available under version control, allows to rec
- **sampling units**: https://doi.org/10.5281/zenodo.5814900
- **hunting grounds**: https://doi.org/10.5281/zenodo.5584203
- **OpenStreetMap snapshot**: https://doi.org/10.5281/zenodo.5792948

# How to update the maps

## Downloading and republish the source data

1. `source/zenodo/update_osm_pbf.R` handles the OpenStreetMap data.
1. `source/zenodo/update_jacht.R` handles the hunting area data.
Note that you need to update the URL, publication date and version.
10 changes: 5 additions & 5 deletions data/downloads/checksum.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
file,sha512
geofabrik_belgium-latest.osm.pbf,bd685b823d12ae1322a17b7f56ef566bd3ae37966b2a814137bee11894076ae3541813e01f83e312a09ee402cf74faf30202c94fc5a3f7c69110a12aeb949807
jacht.zip,e948916e507ce4b4b66b328e7ad8ae72f74304da141e01421119d16de5a84c4f3d96191b900ddf6641a05eddb88c9c80302ea49fc6cad8388f1e0891149a6f6a
jachtter.dbf,4038b72b47495333b83b36b8542b8e89f3b20d450bb5620032d2643d4d537b2840d8d67ec98e63ee4619ccc90b9a2aae4449aa1434a883b8e95fb38a61ce2c35
geofabrik_belgium-latest.osm.pbf,66eea6074eaf53cb3cfe6fb6970798d1a8dfb7768ef07e71a3cd75dda8f10d5c1053d678ad9715c3a76f288715e410a5dbf249772e35cf61049d19accbc0d82d
jacht.zip,48bf917af46b54e88647ca38e0b045616692b4cf5a86078521c875fc6011d6ad5c7de55a95fffacf750b9a59f45ad2695311f88d4b8557e0dc2678011744e9bb
jachtter.dbf,05391319d2328301d7aa9d370c0de5013923abae946bacd4b82a7c8dea57997bfa356d49008da85e49f114038c26946be99691651086fb7f8b635a8494e81e36
jachtter.prj,ee7b429567697bd7f4121c69aeb3d345a9176be5206f339b5902c755a567cdf78706326706ad682cd80fe167726cbfe9ecc12a746681bbeeada5226426d2aaf2
jachtter.shp,cfa4c161856d78ff1e76569438040de741a05b3bbc3c8673a724845c12b9c081667919cd8466d0394948ea7bd59f9df5cc118ea1cec7df308ef336cb3e44aeeb
jachtter.shx,de58c01fabd81f83337f0896fea3e9f4f9d4e9ac1b2aeb09d37a107331f66781da4eecb7153c40bb760711e9a8342f0eb02b432efcc2b7c35e69375d67737b00
jachtter.shp,00c7d6073980b38382cb826af0b7d1664a45e290ac30270736b24b1536d02f5e931fe4ab4f360c7b80e01b8444d39aaaabc7c1963754b36e431974b8244875f5
jachtter.shx,f85eab2988a4e97ba9dbe627395edd529b35e661781019a3fc40419af9240e4fb098762df7b8dea6fbc798ae4ba592bef3a7dfeafd0d2f3531a1b07c8658d8b6
2 changes: 1 addition & 1 deletion data/downloads/checksum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
NA string: NA
sorting: file
hash: 4357f869729f2486f31b410815b8dbd8fa089baf
data_hash: 1c6612a0dd5ead667de79a73736f6c3a1fd96054
data_hash: 26a64e4362d3808591508869441cbe4c59b9a2a3
file:
class: character
sha512:
Expand Down
2 changes: 1 addition & 1 deletion renv.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"R": {
"Version": "4.3.0",
"Version": "4.3.2",
"Repositories": [
{
"Name": "CRAN",
Expand Down
13 changes: 13 additions & 0 deletions source/create_map/atlas.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,16 @@ for (this_layout in c("Cartoweb", "luchtfoto", "OSM")) {
)
}
}

old_wd <- getwd()
for (root in list.dirs(target_folder)) {
setwd(root)
message(root)
to_zip <- list.files(root, pattern = "*.pdf")
zip_file <- gsub("jachtveld_([0-9]{3}).*_(.*).pdf", "wbe_\\1_\\2.zip", to_zip)
for (zf in unique(zip_file)) {
message(zf)
zip(zf, files = to_zip[zip_file == zf])
}
}
setwd(old_wd)
4 changes: 2 additions & 2 deletions source/create_map/download.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (file_test("-f", here(dl, "jachtter.shp"))) {
} else {
target <- "jacht.zip"
if (!file_test("-f", here(dl, target))) {
download_zenodo(doi = "10.5281/zenodo.7190764", path = dl, timeout = 600)
download_zenodo(doi = "10.5281/zenodo.10212759", path = dl, timeout = 600)
}
here(dl, target) |>
file() |>
Expand Down Expand Up @@ -84,7 +84,7 @@ if (file_test("-f", here(dl, target))) {
hash == hashes$sha512[hashes$file == target]
)
} else {
download_zenodo(doi = "10.5281/zenodo.7962764", path = dl, timeout = 600)
download_zenodo(doi = "10.5281/zenodo.10212939", path = dl, timeout = 600)
here(dl, target) |>
file() |>
sha512() |>
Expand Down

0 comments on commit 2565019

Please sign in to comment.