diff --git a/Makefile b/Makefile index 14e8774..42e70f5 100644 --- a/Makefile +++ b/Makefile @@ -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 $@ diff --git a/mj-msc.tex b/mj-msc.tex index 295c21c..a23de9d 100644 --- a/mj-msc.tex +++ b/mj-msc.tex @@ -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} diff --git a/visuals.sql b/visuals.sql index 751a6d1..109ef07 100644 --- a/visuals.sql +++ b/visuals.sql @@ -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;