From ce1d1eb6fd194fe7ac3c5f4c137bc3bc66b54a14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Wed, 19 May 2021 22:57:50 +0300 Subject: [PATCH] generate WM visuals --- Makefile | 3 +++ visuals.sql | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 509872e..a609946 100644 --- a/Makefile +++ b/Makefile @@ -58,6 +58,9 @@ mj-msc-full.pdf: mj-msc.pdf version.inc.tex $(ARCHIVABLES) ## Thesis for publish .PHONY: test test: .faux_test ## Unit tests (fast) +.PHONY: visuals +visuals: .faux_visuals # Generate visuals for paper (fast) + .PHONY: test-rivers test-rivers: .faux_test-rivers ## Rivers tests (slow) diff --git a/visuals.sql b/visuals.sql index 722d453..800c366 100644 --- a/visuals.sql +++ b/visuals.sql @@ -85,16 +85,17 @@ declare i integer; geom1 geometry; geom2 geometry; + geom3 geometry; begin foreach i in array array[16, 64, 256] loop geom1 = st_simplify((select way from wm_visuals where name='salvis'), i); geom2 = st_simplifyvw((select way from wm_visuals where name='salvis'), i*i); + geom3 = st_simplifywm((select way from wm_visuals where name='salvis'), i); insert into wm_visuals(name, way) values ('salvis-douglas-' || i, geom1), ('salvis-douglas-' || i || '-chaikin', st_chaikinsmoothing(geom1, 5)), ('salvis-visvalingam-' || i, geom2), - ('salvis-visvalingam-' || i || '-chaikin', st_chaikinsmoothing(geom2, 5)); + ('salvis-visvalingam-' || i || '-chaikin', st_chaikinsmoothing(geom2, 5)), + ('salvis-wm-' || i, geom3); end loop; end $$ language plpgsql; - -insert into wm_demo (name, way) select name, ST_SimplifyWM(way, 75, null, name) from wm_visuals where name='salvis';