@@ -50,114 +50,142 @@ clean-downloads:
5050
5151build/ch/municipalities.shp : src/V200/$(YEAR ) /VEC200_Commune.shp
5252 mkdir -p $(dir $@ )
53+ rm -f $@
5354 ogr2ogr $(if $(REPROJECT ) ,-t_srs EPSG:4326 -s_srs EPSG:21781) -where " COUNTRY = 'CH' AND SEENR = 0" $@ $<
5455
5556build/zh/municipalities.shp : build/ch/municipalities.shp
5657 mkdir -p $(dir $@ )
58+ rm -f $@
5759 ogr2ogr -where " KANTONSNR = 1" $@ $<
5860
5961build/be/municipalities.shp : build/ch/municipalities.shp
6062 mkdir -p $(dir $@ )
63+ rm -f $@
6164 ogr2ogr -where " KANTONSNR = 2" $@ $<
6265
6366build/lu/municipalities.shp : build/ch/municipalities.shp
6467 mkdir -p $(dir $@ )
68+ rm -f $@
6569 ogr2ogr -where " KANTONSNR = 3" $@ $<
6670
6771build/ur/municipalities.shp : build/ch/municipalities.shp
6872 mkdir -p $(dir $@ )
73+ rm -f $@
6974 ogr2ogr -where " KANTONSNR = 4" $@ $<
7075
7176build/sz/municipalities.shp : build/ch/municipalities.shp
7277 mkdir -p $(dir $@ )
78+ rm -f $@
7379 ogr2ogr -where " KANTONSNR = 5" $@ $<
7480
7581build/ow/municipalities.shp : build/ch/municipalities.shp
7682 mkdir -p $(dir $@ )
83+ rm -f $@
7784 ogr2ogr -where " KANTONSNR = 6" $@ $<
7885
7986build/nw/municipalities.shp : build/ch/municipalities.shp
8087 mkdir -p $(dir $@ )
88+ rm -f $@
8189 ogr2ogr -where " KANTONSNR = 7" $@ $<
8290
8391build/gl/municipalities.shp : build/ch/municipalities.shp
8492 mkdir -p $(dir $@ )
93+ rm -f $@
8594 ogr2ogr -where " KANTONSNR = 8" $@ $<
8695
8796build/zg/municipalities.shp : build/ch/municipalities.shp
8897 mkdir -p $(dir $@ )
98+ rm -f $@
8999 ogr2ogr -where " KANTONSNR = 9" $@ $<
90100
91101build/fr/municipalities.shp : build/ch/municipalities.shp
92102 mkdir -p $(dir $@ )
103+ rm -f $@
93104 ogr2ogr -where " KANTONSNR = 10" $@ $<
94105
95106build/so/municipalities.shp : build/ch/municipalities.shp
96107 mkdir -p $(dir $@ )
108+ rm -f $@
97109 ogr2ogr -where " KANTONSNR = 11" $@ $<
98110
99111build/bs/municipalities.shp : build/ch/municipalities.shp
100112 mkdir -p $(dir $@ )
113+ rm -f $@
101114 ogr2ogr -where " KANTONSNR = 12" $@ $<
102115
103116build/bl/municipalities.shp : build/ch/municipalities.shp
104117 mkdir -p $(dir $@ )
118+ rm -f $@
105119 ogr2ogr -where " KANTONSNR = 13" $@ $<
106120
107121build/sh/municipalities.shp : build/ch/municipalities.shp
108122 mkdir -p $(dir $@ )
123+ rm -f $@
109124 ogr2ogr -where " KANTONSNR = 14" $@ $<
110125
111126build/ar/municipalities.shp : build/ch/municipalities.shp
112127 mkdir -p $(dir $@ )
128+ rm -f $@
113129 ogr2ogr -where " KANTONSNR = 15" $@ $<
114130
115131build/ai/municipalities.shp : build/ch/municipalities.shp
116132 mkdir -p $(dir $@ )
133+ rm -f $@
117134 ogr2ogr -where " KANTONSNR = 16" $@ $<
118135
119136build/sg/municipalities.shp : build/ch/municipalities.shp
120137 mkdir -p $(dir $@ )
138+ rm -f $@
121139 ogr2ogr -where " KANTONSNR = 17" $@ $<
122140
123141build/gr/municipalities.shp : build/ch/municipalities.shp
124142 mkdir -p $(dir $@ )
143+ rm -f $@
125144 ogr2ogr -where " KANTONSNR = 18" $@ $<
126145
127146build/ag/municipalities.shp : build/ch/municipalities.shp
128147 mkdir -p $(dir $@ )
148+ rm -f $@
129149 ogr2ogr -where " KANTONSNR = 19" $@ $<
130150
131151build/tg/municipalities.shp : build/ch/municipalities.shp
132152 mkdir -p $(dir $@ )
153+ rm -f $@
133154 ogr2ogr -where " KANTONSNR = 20" $@ $<
134155
135156build/ti/municipalities.shp : build/ch/municipalities.shp
136157 mkdir -p $(dir $@ )
158+ rm -f $@
137159 ogr2ogr -where " KANTONSNR = 21" $@ $<
138160
139161build/vd/municipalities.shp : build/ch/municipalities.shp
140162 mkdir -p $(dir $@ )
163+ rm -f $@
141164 ogr2ogr -where " KANTONSNR = 22" $@ $<
142165
143166build/vs/municipalities.shp : build/ch/municipalities.shp
144167 mkdir -p $(dir $@ )
168+ rm -f $@
145169 ogr2ogr -where " KANTONSNR = 23" $@ $<
146170
147171build/ne/municipalities.shp : build/ch/municipalities.shp
148172 mkdir -p $(dir $@ )
173+ rm -f $@
149174 ogr2ogr -where " KANTONSNR = 24" $@ $<
150175
151176build/ge/municipalities.shp : build/ch/municipalities.shp
152177 mkdir -p $(dir $@ )
178+ rm -f $@
153179 ogr2ogr -where " KANTONSNR = 25" $@ $<
154180
155181build/ju/municipalities.shp : build/ch/municipalities.shp
156182 mkdir -p $(dir $@ )
183+ rm -f $@
157184 ogr2ogr -where " KANTONSNR = 26" $@ $<
158185
159186build/ch/lakes.shp : src/V200/2014/VEC200_Commune.shp
160187 mkdir -p $(dir $@ )
188+ rm -f $@
161189 ogr2ogr $(if $(REPROJECT ) ,-t_srs EPSG:4326 -s_srs EPSG:21781) -where " SEENR < 9999 AND SEENR > 0" $@ $<
162190
163191build/cantons.tsv : src/V200/$(YEAR ) /VEC200_ADMLVL1.dbf
@@ -264,11 +292,13 @@ topo/ch.json: $(addprefix build/ch-,$(addsuffix .json,municipalities cantons dis
264292
265293build/ch/plz/PLZO_PLZ.shp : downloads/plz.zip
266294 mkdir -p $(dir $@ )
295+ rm -f $@
267296 unzip -o -j -d $(dir $@ ) $<
268297 touch $@
269298
270299build/ch/plz.shp : build/ch/plz/PLZO_PLZ.shp
271300 mkdir -p $(dir $@ )
301+ rm -f $@
272302 ogr2ogr $(if $(REPROJECT ) ,-t_srs EPSG:4326 -s_srs EPSG:21781) $@ $<
273303
274304downloads/plz.zip :
@@ -315,27 +345,32 @@ build/contours/contours_$(CONTOUR_INTERVAL).tif: build/srtm/srtm.tif
315345
316346build/ch/contours_$(CONTOUR_INTERVAL ) .shp : build/contours/contours_$(CONTOUR_INTERVAL ) .tif
317347 mkdir -p $(dir $@ )
348+ rm -f $@
318349 for i in ` seq 0 $( CONTOUR_INTERVAL) 4445` ; do \
319350 gdal_polygonize.py -f " ESRI Shapefile" build/contours/contours_$$ i.tif $(dir $@ ) contours_$$ i.shp contours_$$ i elev; \
320351 done
321352
322353build/ch/country.shp : src/swissBOUNDARIES3D/2014/swissBOUNDARIES3D_1_1_TLM_LANDESGEBIET.shp
323354 mkdir -p $(dir $@ )
355+ rm -f $@
324356 ogr2ogr $(if $(REPROJECT ) ,-t_srs EPSG:4326 -s_srs EPSG:21781,) -where " ICC = 'CH'" $@ $<
325357
326358build/ch/contours-unclipped.shp : build/ch/contours_$(CONTOUR_INTERVAL ) .shp
327359 mkdir -p $(dir $@ )
360+ rm -f $@
328361 ogr2ogr -nlt POLYGON $@ $(dir $< ) contours_0.shp
329362 for i in ` seq $( CONTOUR_INTERVAL) $( CONTOUR_INTERVAL) 4445` ; do \
330363 ogr2ogr -update -append -nln contours-unclipped -nlt POLYGON $@ $(dir $< ) contours_$$ i.shp; \
331364 done
332365
333366build/ch/contours-projected.shp : build/ch/contours-unclipped.shp
334367 mkdir -p $(dir $@ )
368+ rm -f $@
335369 ogr2ogr $(if $(REPROJECT ) ,,-t_srs EPSG:21781 -s_srs EPSG:4326) $@ $<
336370
337371build/ch/contours.shp : build/ch/contours-projected.shp build/ch/country.shp
338372 mkdir -p $(dir $@ )
373+ rm -f $@
339374 ogr2ogr -clipsrc build/ch/country.shp $@ $<
340375
341376topo/ch-contours.json : build/ch/contours.shp
0 commit comments