reduce number of WM examples

This commit is contained in:
Motiejus Jakštys 2021-05-19 22:57:50 +03:00 committed by Motiejus Jakštys
parent 167e9020b4
commit 180912b036
3 changed files with 11 additions and 5 deletions

View File

@ -182,11 +182,13 @@ salvis-visvalingam-64-chaikin-50k_WIDTHDIV = 2
salvis-overlaid-douglas-64-chaikin-50k_1SELECT = wm_visuals where name='salvis'
salvis-overlaid-douglas-64-chaikin-50k_2SELECT = wm_visuals where name='salvis-douglas-64-chaikin'
salvis-overlaid-douglas-64-chaikin-50k_1COLOR = orange
salvis-overlaid-douglas-64-chaikin-50k_WIDTHDIV = 2
salvis-overlaid-douglas-64-chaikin-50k_QUADRANT = 1
salvis-overlaid-visvalingam-64-chaikin-50k_1SELECT = wm_visuals where name='salvis'
salvis-overlaid-visvalingam-64-chaikin-50k_2SELECT = wm_visuals where name='salvis-visvalingam-64-chaikin'
salvis-overlaid-visvalingam-64-chaikin-50k_1COLOR = orange
salvis-overlaid-visvalingam-64-chaikin-50k_WIDTHDIV = 2
salvis-overlaid-visvalingam-64-chaikin-50k_QUADRANT = 1
@ -200,7 +202,7 @@ salvis-overlaid-visvalingam-64-chaikin-50k_QUADRANT = 1
bash db -f $<
touch $@
.faux_visuals: visuals.sql Makefile .faux_test
.faux_visuals: visuals.sql .faux_test
bash db -v scaledwidth=$(SCALEDWIDTH) -f $<
touch $@

View File

@ -1324,10 +1324,10 @@ Like explained in section~\ref{sec:reproducing-the-paper}, illustrations in
\inputcode{bash}{extract-and-generate}
\subsection{Function \textsc{st\_simplifywv}}
\inputcode{postgresql}{wm.sql}
%\inputcode{postgresql}{wm.sql}
\subsection{Function \textsc{aggregate\_rivers}}
\inputcode{postgresql}{aggregate-rivers.sql}
%\inputcode{postgresql}{aggregate-rivers.sql}
\end{appendices}
\end{document}

View File

@ -117,12 +117,16 @@ 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, 50, '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));
end loop;
-- TODO: try 32, 64, 256?
foreach i in array array[16, 24] loop
geom3 = st_simplifywm((select way from wm_visuals where name='salvis'), i, 50, 'salvis-' || i);
insert into wm_visuals(name, way) values
('salvis-wm-' || i, geom3);
end loop;
end $$ language plpgsql;