From ddc06c89de39af419429de5eefaf86cf818fe4a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Fri, 6 Jun 2025 22:03:38 +0300 Subject: [PATCH] some modern updates --- contours/Makefile | 4 ++-- contours/clip-2009.awk | 4 ++-- contours/clip-2017.awk | 2 +- contours/config.mk | 8 ++++++-- contours/managedb | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/contours/Makefile b/contours/Makefile index ec00f9f..7c53ffd 100644 --- a/contours/Makefile +++ b/contours/Makefile @@ -26,7 +26,7 @@ db/contour_%: contour_%.gpkg db/.ready touch $@ contour_%.gpkg: all.tif - gdal_contour -a z -nln $(basename $@) -i $(subst _,.,$*) -a z $^ $@ + gdal_contour -nln $(basename $@) -i $(subst _,.,$*) -a z $^ $@ ifeq ($(VARIANT),2009) all.tif: all.vrt all.xyz @@ -51,7 +51,7 @@ all.xyz: $(XYZ) .INTERMEDIATE: $(XYZ) %.xyz: %.zip - unzip -qq -c $< $@ | \ + 7z x -so $< $@ | \ ./clip-$(VARIANT).awk $(addprefix -v ,$(BOUNDS)) | \ $(SORT) > $@ diff --git a/contours/clip-2009.awk b/contours/clip-2009.awk index 0b02549..4872c2c 100755 --- a/contours/clip-2009.awk +++ b/contours/clip-2009.awk @@ -1,5 +1,5 @@ -#!/usr/bin/awk -f - +#!/usr/bin/env -S awk -f +# # this file works with SEZP from circa 2009, where x coordinate (the 6-digit one) # is first, and the field separator is ' ' or more spaces. $1 > xmin && $1 < xmax && $2 > ymin && $2 < ymax { diff --git a/contours/clip-2017.awk b/contours/clip-2017.awk index 5ed6b6f..e6b3c03 100755 --- a/contours/clip-2017.awk +++ b/contours/clip-2017.awk @@ -1,4 +1,4 @@ -#!/usr/bin/awk -f +#!/usr/bin/env -S awk -f # # this file works with SEZP circa ~2017 where y coordinate (the 7-digit one) is # first, and the field separator is ',' diff --git a/contours/config.mk b/contours/config.mk index 8664381..812d0c7 100644 --- a/contours/config.mk +++ b/contours/config.mk @@ -9,5 +9,9 @@ #VARIANT = 2017 #vienuolio -BOUNDS = xmin=582874 ymin=6060212 xmax=583246 ymax=6060547 -VARIANT = 2017 +#BOUNDS = xmin=582874 ymin=6060212 xmax=583246 ymax=6060547 +#VARIANT = 2017 + +#paparciai +BOUNDS = xmin=545754 ymin=6086394 xmax=550000 ymax=6089022 +VARIANT = 2009 diff --git a/contours/managedb b/contours/managedb index 29e41e0..d5806bb 100755 --- a/contours/managedb +++ b/contours/managedb @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash _psql() { env \