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