From ba6679982981a9d5102726e3becd910674e7030f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Mon, 25 May 2020 15:03:00 +0300 Subject: [PATCH] add visvalingam.sql --- II/Referatas/Makefile | 2 +- II/Referatas/mj-referatas.tex | 2 +- II/Referatas/visvalingam.sql | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 II/Referatas/visvalingam.sql diff --git a/II/Referatas/Makefile b/II/Referatas/Makefile index c2216df..0d2e509 100644 --- a/II/Referatas/Makefile +++ b/II/Referatas/Makefile @@ -15,7 +15,7 @@ db/.faux_$(1)-$(2): $(1).sql db/.faux_ready touch db/.faux_$(1)-$(2) $(1)-$(2).pdf: layer2img.py db/.faux_$(1)-$(2) - ./layer2img.py --table=$(1)_$(2) --size=74x52 --outfile $(1)-$(2).pdf + ./layer2img.py --table=$(1)_$(2) --size=52x74 --outfile $(1)-$(2).pdf endef $(foreach t,$(TOLERANCES),$(eval $(call algo2img,douglas,$(t)))) diff --git a/II/Referatas/mj-referatas.tex b/II/Referatas/mj-referatas.tex index 776cd15..c158b38 100644 --- a/II/Referatas/mj-referatas.tex +++ b/II/Referatas/mj-referatas.tex @@ -143,7 +143,7 @@ As one can observe in figure~\ref{fig:douglas-300}, the Douglas \& Peucker with Douglas \& Peucker & Visvalingam-Whyatt \tabularnewline \hline - \center 0 & + Original & \multicolumn{2}{ | l | }{ \includegraphics[width=.84\columnwidth]{douglas-0} } \tabularnewline \hline diff --git a/II/Referatas/visvalingam.sql b/II/Referatas/visvalingam.sql new file mode 100644 index 0000000..fb841e8 --- /dev/null +++ b/II/Referatas/visvalingam.sql @@ -0,0 +1,14 @@ +DROP TABLE IF EXISTS visvalingam_:tolerance; + +CREATE TABLE visvalingam_:tolerance ( + fid serial NOT NULL, + geom geometry(MULTILINESTRING, 3346) +); + +INSERT INTO visvalingam_:tolerance (geom) ( + SELECT + ST_SimplifyVW (ST_LineMerge (ST_Union (geom)), + :tolerance * :tolerance) AS geoms + FROM + zeimena); +