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

Add 2024 #325

Merged
merged 1 commit into from
Mar 1, 2024
Merged
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
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# https://www.bfs.admin.ch/bfs/de/home/dienstleistungen/geostat/geodaten-bundesstatistik/administrative-grenzen/generalisierte-gemeindegrenzen.html
#

YEARS := 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2021-04 2021-07 2022 2022-05 2023
YEARS := 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2021-04 2021-07 2022 2022-05 2023 2024
SHAPES := country cantons districts municipalities lakes
SHAPEFILE_EXT := shp dbf prj shx

Expand Down Expand Up @@ -181,6 +181,10 @@ shapefile/2023/$(1).$(2): downloads/2023.zip
@mkdir -p $$(dir $$@)
unzip -p $$< ag-b-00.03-875-gg23/ggg_2023_LV95/shp/g1$(1)23.$(2) > $$@

shapefile/2024/$(1).$(2): downloads/2024.zip
@mkdir -p $$(dir $$@)
unzip -p $$< ag-b-00.03-875-gg24/ggg_2024_LV95/shp/g1$(1)24.$(2) > $$@

# Files from 2018 on seem to be consistently structured
shapefile/20%/$(1).$(2): downloads/20%.zip
@mkdir -p $$(dir $$@)
Expand All @@ -202,6 +206,10 @@ $(foreach type,g k l s b,$(foreach ext,$(SHAPEFILE_EXT),$(eval $(call extract_fr
# @echo 'cantons -> $(call rename,cantons)'
# @echo 'districts -> $(call rename,districts)'

downloads/2024.zip:
mkdir -p $(dir $@)
curl -o $@ "https://dam-api.bfs.admin.ch/hub/api/dam/assets/30487000/master"

downloads/2023.zip:
mkdir -p $(dir $@)
curl -o $@ "https://dam-api.bfs.admin.ch/hub/api/dam/assets/24106754/master"
Expand Down
Loading