more consistent figure names

This commit is contained in:
Motiejus Jakštys 2021-05-19 22:57:52 +03:00 committed by Motiejus Jakštys
parent 502cd5025a
commit 79093e766e
3 changed files with 59 additions and 79 deletions

101
Makefile
View File

@ -43,11 +43,8 @@ RIVERS = \
salvis-overlaid-vwchaikin64-50k \ salvis-overlaid-vwchaikin64-50k \
salvis-wm220-10x \ salvis-wm220-10x \
salvis-wm220-2x \ salvis-wm220-2x \
salvis-wm-50k \
salvis-wm-50k-nw \
salvis-wm-50k-ne \
salvis-wm-overlaid-250k-zoom \ salvis-wm-overlaid-250k-zoom \
salvis-wm-grpk50 \ salvis-wm75-grpk50-grpk10 \
salvis-wm75-grpk50-grpk10ne \ salvis-wm75-grpk50-grpk10ne \
salvis-wm220 salvis-wm220
@ -140,6 +137,45 @@ salvis-grpk250-2x_WIDTHDIV = 2
# 50K # 50K
################################################################################ ################################################################################
label_wm75 = Wang--Müller
label_vw64 = Visvalingam--Whyatt
label_dp64 = Douglas \& Peucker
label_grpk10 = GRPK 1:\numprint{10000}
label_grpk50 = GRPK 1:\numprint{50000}
label_vw64chaikin = $(label_vw64) and Chaikin
label_dp64chaikin = $(label_dp64) and Chaikin
legend_ = lower left
legend_tr = lower right
legend_tl = lower center
define wm_vwdp50k
RIVERS += salvis-$(1)-$(2)-$(3)-50k$(4)
salvis-$(1)-$(2)-$(3)-50k$(4)_1SELECT = wm_visuals where name='salvis-$(1)'
salvis-$(1)-$(2)-$(3)-50k$(4)_1COLOR = orange
salvis-$(1)-$(2)-$(3)-50k$(4)_1LABEL = $(label_$(1))
salvis-$(1)-$(2)-$(3)-50k$(4)_2SELECT = wm_visuals where name='salvis-$(2)'
salvis-$(1)-$(2)-$(3)-50k$(4)_2COLOR = green
salvis-$(1)-$(2)-$(3)-50k$(4)_2LABEL = $(label_$(2))
$(if $(3),
salvis-$(1)-$(2)-$(3)-50k$(4)_3SELECT = wm_visuals where name='salvis-$(3)'
salvis-$(1)-$(2)-$(3)-50k$(4)_3LINESTYLE = dotted
salvis-$(1)-$(2)-$(3)-50k$(4)_3LABEL = $(label_$(3))
,)
salvis-$(1)-$(2)-$(3)-50k$(4)_QUADRANT = $(4)
salvis-$(1)-$(2)-$(3)-50k$(4)_LEGEND = $(legend_$(4))
endef
$(foreach x,vw64 dp64 vwchaikin64 dpchaikin64,\
$(eval $(call wm_vwdp50k,wm75,$(x),grpk10,)) \
$(eval $(call wm_vwdp50k,wm75,$(x),grpk10,tl)) \
$(eval $(call wm_vwdp50k,wm75,$(x),grpk10,tr)) \
)
$(eval $(call wm_vwdp50k,wm75,grpk50,grpk10))
$(eval $(call wm_vwdp50k,wm75,grpk50,grpk10,tr))
$(eval $(call wm_vwdp50k,wm75,grpk10,,))
$(eval $(call wm_vwdp50k,wm75,grpk10,,tr))
$(eval $(call wm_vwdp50k,wm75,grpk10,,tl))
salvis-25k_1SELECT = wm_visuals where name='salvis-grpk10' salvis-25k_1SELECT = wm_visuals where name='salvis-grpk10'
salvis-25k_WIDTHDIV = 1 salvis-25k_WIDTHDIV = 1
@ -170,63 +206,9 @@ salvis-overlaid-vwchaikin64-50k_1COLOR = orange
salvis-overlaid-vwchaikin64-50k_WIDTHDIV = 2 salvis-overlaid-vwchaikin64-50k_WIDTHDIV = 2
salvis-overlaid-vwchaikin64-50k_QUADRANT = tl salvis-overlaid-vwchaikin64-50k_QUADRANT = tl
salvis-wm-50k_1SELECT = wm_visuals where name='salvis-wm75'
salvis-wm-50k_2SELECT = wm_visuals where name='salvis-grpk10'
salvis-wm-50k_1COLOR = orange
salvis-wm-50k-nw_1SELECT = wm_visuals where name='salvis-wm75'
salvis-wm-50k-nw_2SELECT = wm_visuals where name='salvis-grpk10'
salvis-wm-50k-nw_1COLOR = orange
salvis-wm-50k-nw_QUADRANT = tr
salvis-wm-50k-ne_1SELECT = wm_visuals where name='salvis-wm75'
salvis-wm-50k-ne_2SELECT = wm_visuals where name='salvis-grpk10'
salvis-wm-50k-ne_1COLOR = orange
salvis-wm-50k-ne_QUADRANT = tl
salvis-wm-grpk50_1SELECT = wm_visuals where name='salvis-wm75'
salvis-wm-grpk50_2SELECT = wm_visuals where name='salvis-grpk50'
salvis-wm-grpk50_3SELECT = wm_visuals where name='salvis-grpk10'
salvis-wm-grpk50_1COLOR = orange
salvis-wm-grpk50_2COLOR = green
salvis-wm-grpk50_3LINESTYLE = dotted
salvis-wm220_1SELECT = wm_visuals where name='salvis-wm220' salvis-wm220_1SELECT = wm_visuals where name='salvis-wm220'
salvis-wm220_WIDTHDIV = 2 salvis-wm220_WIDTHDIV = 2
label_wm75 = Wang--Müller
label_vw64 = Visvalingam--Whyatt
label_dp64 = Douglas \& Peucker
label_grpk10 = GRPK 1:\numprint{10000}
label_grpk50 = GRPK 1:\numprint{50000}
label_vw64chaikin = $(label_vw64) and Chaikin
label_dp64chaikin = $(label_dp64) and Chaikin
legend_ = lower left
legend_tr = lower right
legend_tl = lower center
define wm_vwdp50k
RIVERS += salvis-$(1)-$(2)-$(3)-50k$(4)
salvis-$(1)-$(2)-$(3)-50k$(4)_1SELECT = wm_visuals where name='salvis-$(1)'
salvis-$(1)-$(2)-$(3)-50k$(4)_2SELECT = wm_visuals where name='salvis-$(2)'
salvis-$(1)-$(2)-$(3)-50k$(4)_3SELECT = wm_visuals where name='salvis-$(3)'
salvis-$(1)-$(2)-$(3)-50k$(4)_1COLOR = orange
salvis-$(1)-$(2)-$(3)-50k$(4)_1LABEL = $(label_$(1))
salvis-$(1)-$(2)-$(3)-50k$(4)_2COLOR = green
salvis-$(1)-$(2)-$(3)-50k$(4)_2LABEL = $(label_$(2))
salvis-$(1)-$(2)-$(3)-50k$(4)_3LINESTYLE = dotted
salvis-$(1)-$(2)-$(3)-50k$(4)_3LABEL = $(label_$(3))
salvis-$(1)-$(2)-$(3)-50k$(4)_QUADRANT = $(4)
salvis-$(1)-$(2)-$(3)-50k$(4)_LEGEND = $(legend_$(4))
endef
$(foreach x,vw64 dp64 vwchaikin64 dpchaikin64,\
$(eval $(call wm_vwdp50k,wm75,$(x),grpk10,)) \
$(eval $(call wm_vwdp50k,wm75,$(x),grpk10,tl)) \
$(eval $(call wm_vwdp50k,wm75,$(x),grpk10,tr)) \
)
$(eval $(call wm_vwdp50k,wm75,grpk50,grpk10,tr))
define FIG_template define FIG_template
$(1).pdf: layer2img.py Makefile $(2) $(1).pdf: layer2img.py Makefile $(2)
python3 ./layer2img.py --outfile=$(1).pdf \ python3 ./layer2img.py --outfile=$(1).pdf \
@ -241,7 +223,6 @@ $(1).pdf: layer2img.py Makefile $(2)
) )
endef endef
$(foreach fig,$(FIGURES),$(eval $(call FIG_template,$(fig),.faux_test))) $(foreach fig,$(FIGURES),$(eval $(call FIG_template,$(fig),.faux_test)))
$(foreach fig,$(RIVERS), $(eval $(call FIG_template,$(fig),.faux_visuals))) $(foreach fig,$(RIVERS), $(eval $(call FIG_template,$(fig),.faux_visuals)))
@ -292,8 +273,6 @@ mj-msc.pdf: mj-msc.tex version.inc.tex vars.inc.tex bib.bib \
.PHONY: allfigs .PHONY: allfigs
allfigs: $(addsuffix .pdf,$(FIGURES)) $(addsuffix .pdf,$(RIVERS)) allfigs: $(addsuffix .pdf,$(FIGURES)) $(addsuffix .pdf,$(RIVERS))
.faux_db_pre: db init.sql .faux_db_pre: db init.sql
bash db start bash db start
bash db -f init.sql bash db -f init.sql

View File

@ -22,7 +22,7 @@ COLORS = {
# see `NOTICE` in the LaTeX document; this is the width of the main text block. # see `NOTICE` in the LaTeX document; this is the width of the main text block.
TEXTWIDTH_CM = 12.12364 TEXTWIDTH_CM = 12.12364
QUADRANTS = {'tr':1, 'br':2, 'bl':3, 'tl':4} QUADRANTS = {'tr':1, 'tl':2, 'bl':3, 'br':4}
def color(string): def color(string):
return COLORS[string if string else 'black'] return COLORS[string if string else 'black']

View File

@ -1394,36 +1394,36 @@ Our generalized results are viewed from the following angles:
\begin{figure}[h!] \begin{figure}[h!]
\centering \centering
\includegraphics[width=\textwidth]{salvis-wm-50k} \includegraphics[width=\textwidth]{salvis-wm75-grpk10--50k}
\caption{2x zoomed-in {\WM} for 1:\numprint{50000}.} \caption{2x zoomed-in {\WM} for 1:\numprint{50000}.}
\label{fig:salvis-wm-50k} \label{fig:salvis-wm75-grpk10--50k}
\end{figure} \end{figure}
As one can see in Figure~\ref{fig:salvis-wm-50k}, the illustrations deliver As one can see in Figure~\ref{fig:salvis-wm75-grpk10--50k}, the illustrations deliver
what was promised by the algorithm, but with a few caveats. Left side of the what was promised by the algorithm, but with a few caveats. Left side of the
figure looks reasonably well simplified: long bends remain slightly curved, figure looks reasonably well simplified: long bends remain slightly curved,
small bends are removed or slightly exaggerated. small bends are removed or slightly exaggerated.
Figure's~\ref{fig:salvis-wm-50k} left part is clipped to Figure's~\ref{fig:salvis-wm75-grpk10--50k} left part is clipped to
Figure~\ref{fig:salvis-wm-50k-nw}. As one can see, some bends were well Figure~\ref{fig:salvis-wm75-grpk10--50ktl}. As one can see, some bends were well
exaggerated, and some bends were eliminated. exaggerated, and some bends were eliminated.
\begin{figure}[h!] \begin{figure}[h!]
\centering \centering
\includegraphics[width=\textwidth]{salvis-wm-50k-nw} \includegraphics[width=\textwidth]{salvis-wm75-grpk10--50ktl}
\caption{Left part of Figure~\ref{fig:salvis-wm-50k}.} \caption{Left part of Figure~\ref{fig:salvis-wm75-grpk10--50k}.}
\label{fig:salvis-wm-50k-nw} \label{fig:salvis-wm75-grpk10--50ktl}
\end{figure} \end{figure}
Top--right side (clipped in Figure~\ref{fig:salvis-wm-50k-ne}) some jagged Top--right side (clipped in Figure~\ref{fig:salvis-wm75-grpk10--50ktl}) some jagged
and sharp bends appear. These will become more pronounced in even larger-scale and sharp bends appear. These will become more pronounced in even larger-scale
simplification in the next section. simplification in the next section.
\begin{figure}[h!] \begin{figure}[h!]
\centering \centering
\includegraphics[width=\textwidth]{salvis-wm-50k-ne} \includegraphics[width=\textwidth]{salvis-wm75-grpk10--50ktr}
\caption{Top--right part of Figure~\ref{fig:salvis-wm-50k}.} \caption{Top--right part of Figure~\ref{fig:salvis-wm75-grpk10--50k}.}
\label{fig:salvis-wm-50k-ne} \label{fig:salvis-wm75-grpk10--50ktr}
\end{figure} \end{figure}
To sum up, mid-scale simplification works well for some geometries, but creates To sum up, mid-scale simplification works well for some geometries, but creates
@ -1511,23 +1511,23 @@ compares the resulting {\WM}--generalized rivers to grpk50LT and grpk250LT.
\subsubsection{Medium-scale (1:\numprint{50000})} \subsubsection{Medium-scale (1:\numprint{50000})}
For our research location, the national dataset GDB10LT is almost equivalent to For our research location, the national dataset GDB10LT is almost equivalent to
grpk50LT, with a few nuances. Figure~\ref{fig:salvis-wm-grpk50} illustrates grpk50LT, with a few nuances. Figure~\ref{fig:salvis-wm75-grpk50-grpk10} illustrates
all three shapes: grpk50LT, {\WM}--simplified GDB10LT, and the original GDB10LT. all three shapes: grpk50LT, {\WM}--simplified GDB10LT, and the original GDB10LT.
\begin{figure}[h!] \begin{figure}[h!]
\centering \centering
\includegraphics[width=\textwidth]{salvis-wm-grpk50} \includegraphics[width=\textwidth]{salvis-wm75-grpk50-grpk10}
\caption{2x zoomed-in grpk50LT (green), {\WM}--simplified GDB10LT (orange) \caption{2x zoomed-in grpk50LT (green), {\WM}--simplified GDB10LT (orange)
and original GDB10LT (dotted black).} and original GDB10LT (dotted black).}
\label{fig:salvis-wm-grpk50} \label{fig:salvis-wm75-grpk50-grpk10}
\end{figure} \end{figure}
\begin{figure}[h!] \begin{figure}[h!]
\centering \centering
\includegraphics[width=\textwidth]{salvis-wm75-grpk50-grpk10-50ktr} \includegraphics[width=\textwidth]{salvis-wm75-grpk50-grpk10-50ktr}
\caption{Top--right side of Figure~\ref{fig:salvis-wm-grpk50}.} \caption{Top--right side of Figure~\ref{fig:salvis-wm75-grpk50-grpk10}.}
\label{fig:salvis-wm75-grpk50-grpk10-50ktr} \label{fig:salvis-wm75-grpk50-grpk10-50ktr}
\end{figure} \end{figure}
@ -1697,7 +1697,8 @@ paper on a warm pre-COVID summer evening. I got intrigued. He was also an early
beta-tester of my implementation, and helped me understand where the initial beta-tester of my implementation, and helped me understand where the initial
algorithm descriptions were ambiguous. algorithm descriptions were ambiguous.
Many thanks to NŽT for providing the datasets with a very permissive license. Many thanks to NŽT\cite{nzt} for providing the datasets with a very permissive
license.
\printbibliography \printbibliography