proper sinewave comparisons
This commit is contained in:
parent
a8dc7e82d5
commit
82b4400474
@ -1,12 +1,13 @@
|
||||
ZEIMENA_TOLERANCES = 100 125 250 500 1000 2000 4000
|
||||
SINEWAVE_TOLERANCES = 4 5
|
||||
SINEWAVE_TOLERANCES = 1 2 3 4
|
||||
GEN = $(addsuffix .pdf, \
|
||||
$(addprefix sinewave-douglas-,$(SINEWAVE_TOLERANCES)) \
|
||||
$(addprefix sinewave-visvalingam-,$(SINEWAVE_TOLERANCES)) \
|
||||
$(addprefix zeimena-douglas-,$(ZEIMENA_TOLERANCES)) \
|
||||
$(addprefix zeimena-visvalingam-,$(ZEIMENA_TOLERANCES)))
|
||||
|
||||
mj-referatas.pdf: mj-referatas.tex version.tex bib.bib zeimena-pretty.pdf \
|
||||
sinewave.pdf sinewave-douglas-5.pdf $(GEN)
|
||||
sinewave.pdf $(GEN)
|
||||
latexmk -g -pdf $<
|
||||
|
||||
define algo2img
|
||||
@ -15,12 +16,13 @@ db/.faux_$(1)-$(2)-%: $(2).sql db/.faux_ready
|
||||
touch $$@
|
||||
|
||||
$(1)-$(2)-%.pdf: layer2img.py db/.faux_$(1)-$(2)-%
|
||||
./layer2img.py --table=$(1)_$(2)_$$* --size=52x74 --outfile $(1)-$(2)-$$*.pdf
|
||||
./layer2img.py --table=$(1)_$(2)_$$* --size=$(3) --outfile $(1)-$(2)-$$*.pdf
|
||||
endef
|
||||
|
||||
$(eval $(call algo2img,sinewave,douglas))
|
||||
$(eval $(call algo2img,zeimena,douglas))
|
||||
$(eval $(call algo2img,zeimena,visvalingam))
|
||||
$(eval $(call algo2img,sinewave,douglas,52x12))
|
||||
$(eval $(call algo2img,sinewave,visvalingam,52x12))
|
||||
$(eval $(call algo2img,zeimena,douglas,52x74))
|
||||
$(eval $(call algo2img,zeimena,visvalingam,52x74))
|
||||
|
||||
sinewave.gpkg: sinewave.py
|
||||
./sinewave.py
|
||||
|
@ -169,11 +169,11 @@ are comparable?), {\DP} tolerance was arbitrarily squared and fed to {\VW}. To
|
||||
author's eye, this provides comparable and reasonable results, though could be
|
||||
researched.
|
||||
|
||||
As can be observed in table~\ref{tab:dp-vs-vw} on page~\pageref{tab:dp-vs-vw},
|
||||
both simplication algorithms convert bends to chopped lines. This is especially
|
||||
visible in tolerances 250 and 500. In a more robust simplification algorithm,
|
||||
the larger tolerance, the larger the bends on the original map should be
|
||||
retained.
|
||||
As can be observed in table~\ref{tab:comparison-zeimena} on
|
||||
page~\pageref{tab:comparison-zeimena}, both simplication algorithms convert
|
||||
bends to chopped lines. This is especially visible in tolerances 250 and 500.
|
||||
In a more robust simplification algorithm, the larger tolerance, the larger the
|
||||
bends on the original map should be retained.
|
||||
|
||||
\begin{figure}[H]
|
||||
\renewcommand{\tabularxcolumn}[1]{>{\center\small}m{#1}}
|
||||
@ -206,12 +206,11 @@ retained.
|
||||
\includegraphics[width=.0625\linewidth]{zeimena-douglas-4000} &
|
||||
\includegraphics[width=.0625\linewidth]{zeimena-visvalingam-4000} \tabularnewline \hline
|
||||
\end{tabularx}
|
||||
\caption{{\DP} and {\VW} side-by-side visual comparison}
|
||||
\label{tab:dp-vs-vw}
|
||||
\caption{{\DP} and {\VW} side-by-side on Žeimena}
|
||||
\label{tab:comparison-zeimena}
|
||||
\end{figure}
|
||||
|
||||
|
||||
|
||||
To sum up, both {\VW} and {\DP} simplify the lines, but their cartographic
|
||||
output poorly represents lines and bends. Where to look for better output?
|
||||
|
||||
@ -234,13 +233,35 @@ straight line, but too small to retain both and retain their complexity.
|
||||
\end{figure}
|
||||
|
||||
When one applies {\DP} to figure~\ref{pic:sinewave}, either both bends remain,
|
||||
or become a straight line.
|
||||
or become a straight line, see table~\ref{tab:comparison-sinewave} on
|
||||
page~\pageref{tab:comparison-sinewave}.
|
||||
|
||||
\begin{figure}[h]
|
||||
\centering
|
||||
\includegraphics[width=52mm]{sinewave-douglas-5}
|
||||
\caption{Example bend, generalized}
|
||||
\label{pic:sinewave-douglas-5}
|
||||
\renewcommand{\tabularxcolumn}[1]{>{\center\small}m{#1}}
|
||||
\begin{tabularx}{\textwidth}{ p{1.5cm} | X | X | }
|
||||
Tolerance DP/VW &
|
||||
Douglas \& Peucker &
|
||||
Visvalingam-Whyatt \tabularnewline \hline
|
||||
|
||||
1/1 &
|
||||
\includegraphics[width=\linewidth]{sinewave-douglas-1} &
|
||||
\includegraphics[width=\linewidth]{sinewave-visvalingam-1} \tabularnewline \hline
|
||||
|
||||
2/4 &
|
||||
\includegraphics[width=\linewidth]{sinewave-douglas-2} &
|
||||
\includegraphics[width=\linewidth]{sinewave-visvalingam-2} \tabularnewline \hline
|
||||
|
||||
3/9 &
|
||||
\includegraphics[width=\linewidth]{sinewave-douglas-3} &
|
||||
\includegraphics[width=\linewidth]{sinewave-visvalingam-3} \tabularnewline \hline
|
||||
|
||||
4/16 &
|
||||
\includegraphics[width=\linewidth]{sinewave-douglas-4} &
|
||||
\includegraphics[width=\linewidth]{sinewave-visvalingam-4} \tabularnewline \hline
|
||||
|
||||
\end{tabularx}
|
||||
\caption{{\DP} and {\VW} on example wave}
|
||||
\label{tab:comparison-sinewave}
|
||||
\end{figure}
|
||||
|
||||
\section{Related Work and future suggestions}
|
||||
|
Loading…
Reference in New Issue
Block a user