stud

study spacejunk
Log | Files | Refs | LICENSE

commit 16cd3e55adf1e79cfcdf6ad2a31a090aa6fc2fb0 (tree)
parent ef7c679a3f7921fb8305b4b7d86ab94740cbe81f
Author: Motiejus Jakštys <motiejus@uber.com>
Date:   Thu, 13 May 2021 22:50:30 +0300

fix remaining bugs. gone from debug mode.

Diffstat:
MIV/Makefile | 2+-
MIV/mj-msc.tex | 6+++---
MIV/test.sql | 19+++++++++++++++++++
MIV/visuals.sql | 21---------------------
4 files changed, 23 insertions(+), 25 deletions(-)

diff --git a/IV/Makefile b/IV/Makefile @@ -95,7 +95,7 @@ $(1).pdf: layer2img.py Makefile $(2) $$(if $$($(1)_$$(i)LINESTYLE),--group$$(i)-linestyle="$$($(1)_$$(i)LINESTYLE)") \ ) endef -$(foreach fig,$(FIGURES),$(eval $(call FIG_template,$(fig),.faux_visuals))) +$(foreach fig,$(FIGURES),$(eval $(call FIG_template,$(fig),.faux_test))) $(foreach fig,$(RIVERS), $(eval $(call FIG_template,$(fig),.faux_visuals))) test-figures_1SELECT = wm_figures diff --git a/IV/mj-msc.tex b/IV/mj-msc.tex @@ -914,7 +914,7 @@ table~\ref{table:scale-halfcirlce-diameter}. 1:\numprint{15000} & 22.5 \\ 1:\numprint{25000} & 37.5 \\ 1:\numprint{50000} & 75 \\ - 1:\numprint{250000} & 375 \\ + 1:\numprint{250000} & 220 \\ \end{tabular} \caption{{\WM} half-circle diameter $D$ for popular scales.} \label{table:scale-halfcirlce-diameter} @@ -1305,9 +1305,9 @@ some isolated bends are exaggerated, and some small bends are removed. \begin{figure}[ht] \centering - \includegraphics[width=.5\textwidth]{salvis-wm-375-250k} + \includegraphics[width=.5\textwidth]{salvis-wm-220-250k} \caption{{\WM}-generalized river (1:{\numprint{250000}}).} - \label{fig:salvis-wm-375-250k} + \label{fig:salvis-wm-220-250k} \end{figure} diff --git a/IV/test.sql b/IV/test.sql @@ -177,3 +177,22 @@ begin perform assert_equals('ST_LineString', st_geometrytype(bend)); insert into wm_debug(stage, name, gen, nbend, way) values('manual', 'fig3', 1, 1, bend); end $$ language plpgsql; + +-- misc visuals +do $$ + declare fig6b1 geometry; + declare fig6b2 geometry; + declare sclong geometry; + declare scshort geometry; +begin + select way from wm_debug where name='fig6' and stage='bbends' and gen=1 into fig6b1 limit 1 offset 0; + select way from wm_debug where name='fig6' and stage='bbends' and gen=1 into fig6b2 limit 1 offset 2; + insert into wm_visuals (name, way) values('fig6-baseline', st_makeline(st_startpoint(fig6b2), st_endpoint(fig6b2))); + insert into wm_visuals (name, way) values('fig6-newline', st_makeline(st_endpoint(fig6b1), st_endpoint(fig6b2))); + + select way from wm_debug where name='selfcrossing-1' and stage='bbends' and gen=1 into sclong limit 1 offset 1; + select way from wm_debug where name='selfcrossing-1' and stage='bbends' and gen=1 into scshort limit 1 offset 4; + insert into wm_visuals (name, way) values('selfcrossing-1-baseline', st_makeline(st_startpoint(sclong), st_endpoint(sclong))); + insert into wm_visuals (name, way) values('selfcrossing-1-newline', st_makeline(st_startpoint(sclong), st_endpoint(scshort))); +end $$ language plpgsql; + diff --git a/IV/visuals.sql b/IV/visuals.sql @@ -89,27 +89,6 @@ insert into wm_visuals(name, way) values('salvis', ( )); do $$ - declare fig6b1 geometry; - declare fig6b2 geometry; - declare sclong geometry; - declare scshort geometry; -begin - delete from wm_debug where name like 'fig6-%' or name like 'selfcrossing-1%'; - delete from wm_visuals where name like 'fig6-%' or name like 'selfcrossing-1%'; - - select way from wm_debug where name='fig6' and stage='bbends' and gen=1 into fig6b1 limit 1 offset 0; - select way from wm_debug where name='fig6' and stage='bbends' and gen=1 into fig6b2 limit 1 offset 2; - insert into wm_visuals (name, way) values('fig6-baseline', st_makeline(st_startpoint(fig6b2), st_endpoint(fig6b2))); - insert into wm_visuals (name, way) values('fig6-newline', st_makeline(st_endpoint(fig6b1), st_endpoint(fig6b2))); - - select way from wm_debug where name='selfcrossing-1' and stage='bbends' and gen=1 into sclong limit 1 offset 1; - select way from wm_debug where name='selfcrossing-1' and stage='bbends' and gen=1 into scshort limit 1 offset 4; - insert into wm_visuals (name, way) values('selfcrossing-1-baseline', st_makeline(st_startpoint(sclong), st_endpoint(sclong))); - insert into wm_visuals (name, way) values('selfcrossing-1-newline', st_makeline(st_startpoint(sclong), st_endpoint(scshort))); -end $$ language plpgsql; - - -do $$ declare i integer; geom1 geometry;