remove old Makefiles
This commit is contained in:
parent
638dcbb07d
commit
689bb1fdeb
@ -1,49 +0,0 @@
|
|||||||
#krekenava
|
|
||||||
BOUNDS = xmin=493674 ymin=6146103 xmax=518869 ymax=6171741
|
|
||||||
#BOUNDS = xmin=504440 ymin=6154741 xmax=507410 ymax=6158941
|
|
||||||
OUTSIZE = $(shell awk $(addprefix -v ,$(BOUNDS)) 'BEGIN{print ymax-ymin" "xmax-xmin}' /dev/null)
|
|
||||||
XYZ = $(patsubst %.zip,%.xyz,$(wildcard 6*.zip))
|
|
||||||
SORT = sort -n -k2 -k1 -t,
|
|
||||||
|
|
||||||
.PHONY: all
|
|
||||||
all: smooth_2_5.gpkg smooth_5.gpkg
|
|
||||||
|
|
||||||
smooth_%.gpkg: db/smooth_%
|
|
||||||
ogr2ogr $@ "PG:host=127.0.0.1 user=osm dbname=osm password=osm" $(basename $@)
|
|
||||||
|
|
||||||
db/smooth_%: db/contour_% chaikin.sql
|
|
||||||
./managedb -- --echo-all \
|
|
||||||
-v ON_ERROR_STOP=1 \
|
|
||||||
-v src=$(notdir $(basename $<)) \
|
|
||||||
-v tbl=$(notdir $(basename $@)) \
|
|
||||||
-f chaikin.sql
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
db/contour_%: contour_%.gpkg db/.ready
|
|
||||||
./managedb -- -c "DROP TABLE IF EXISTS $(basename $<)"
|
|
||||||
ogr2ogr -f PostgreSQL "PG:host=127.0.0.1 user=osm dbname=osm password=osm" $<
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
contour_%.gpkg: all.tif
|
|
||||||
gdal_contour -nln $(basename $@) -i $(subst _,.,$*) -a z $^ $@
|
|
||||||
|
|
||||||
all.tif: all.vrt all.xyz
|
|
||||||
gdal_grid $< $@ \
|
|
||||||
-a nearest \
|
|
||||||
-ot Float32 -co COMPRESS=DEFLATE -co PREDICTOR=2 \
|
|
||||||
-outsize $(OUTSIZE)
|
|
||||||
|
|
||||||
.INTERMEDIATE: all.xyz
|
|
||||||
all.xyz: $(XYZ)
|
|
||||||
$(SORT) -m $^ > $@
|
|
||||||
|
|
||||||
.INTERMEDIATE: $(XYZ)
|
|
||||||
%.xyz: %.zip
|
|
||||||
unzip -qq -c $< $@ | \
|
|
||||||
./clip-2009.awk $(addprefix -v ,$(BOUNDS)) | \
|
|
||||||
$(SORT) > $@
|
|
||||||
|
|
||||||
db/.ready: managedb
|
|
||||||
mkdir -p db
|
|
||||||
./managedb start
|
|
||||||
touch $@
|
|
@ -1,46 +0,0 @@
|
|||||||
#uzupis
|
|
||||||
BOUNDS = xmin=582700 ymin=6060750 xmax=584830 ymax=6062750
|
|
||||||
XYZ = $(patsubst %.zip,%.xyz,$(wildcard *.zip))
|
|
||||||
SORT = sort -n -k2 -k1 -t,
|
|
||||||
|
|
||||||
.PHONY: all
|
|
||||||
all: smooth_2_5.gpkg smooth_5.gpkg
|
|
||||||
|
|
||||||
smooth_%.gpkg: db/smooth_%
|
|
||||||
ogr2ogr $@ "PG:host=127.0.0.1 user=osm dbname=osm" $(basename $@)
|
|
||||||
|
|
||||||
db/smooth_%: db/contour_% chaikin.sql
|
|
||||||
./managedb -- --echo-all \
|
|
||||||
-v ON_ERROR_STOP=1 \
|
|
||||||
-v src=$(notdir $(basename $<)) \
|
|
||||||
-v tbl=$(notdir $(basename $@)) \
|
|
||||||
-f chaikin.sql
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
db/contour_%: contour_%.gpkg db/.ready
|
|
||||||
./managedb -- -c "DROP TABLE IF EXISTS $(basename $<)"
|
|
||||||
ogr2ogr -f PostgreSQL "PG:host=127.0.0.1 user=osm dbname=osm" $<
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
contour_%.gpkg: all.tif
|
|
||||||
gdal_contour -nln $(basename $@) -i $(subst _,.,$*) -a z $^ $@
|
|
||||||
|
|
||||||
all.tif: all.csv
|
|
||||||
gdal_translate $< $@ \
|
|
||||||
-ot Float32 -a_srs EPSG:3346 \
|
|
||||||
-co COMPRESS=DEFLATE -co PREDICTOR=2
|
|
||||||
|
|
||||||
.INTERMEDIATE: all.csv
|
|
||||||
all.csv: $(XYZ)
|
|
||||||
$(SORT) -m $^ > $@
|
|
||||||
|
|
||||||
.INTERMEDIATE: $(XYZ)
|
|
||||||
%.xyz: %.zip
|
|
||||||
unzip -qq -c $< $@ | \
|
|
||||||
./clip-2017.awk $(addprefix -v ,$(BOUNDS)) | \
|
|
||||||
$(SORT) > $@
|
|
||||||
|
|
||||||
db/.ready: managedb
|
|
||||||
mkdir -p db
|
|
||||||
./managedb start
|
|
||||||
touch $@
|
|
Loading…
Reference in New Issue
Block a user