related work
This commit is contained in:
parent
eb23a93e97
commit
38f75291b2
@ -5,15 +5,15 @@ CROSSING_TOLERANCES = 64 128 256
|
|||||||
SINEWAVE_SIZE = 120x48
|
SINEWAVE_SIZE = 120x48
|
||||||
#CROSSING=622916 6119267 626066 6121487
|
#CROSSING=622916 6119267 626066 6121487
|
||||||
GEN1 = $(addsuffix .pdf, \
|
GEN1 = $(addsuffix .pdf, \
|
||||||
$(addprefix sinewave-douglas-,$(SINEWAVE_TOLERANCES)) \
|
$(addprefix sinewave2-douglas-,$(SINEWAVE_TOLERANCES)) \
|
||||||
$(addprefix sinewave-visvalingam-,$(SINEWAVE_TOLERANCES)) \
|
$(addprefix sinewave2-visvalingam-,$(SINEWAVE_TOLERANCES)) \
|
||||||
$(addprefix zeimena-douglas-,$(ZEIMENA_TOLERANCES)) \
|
$(addprefix zeimena-douglas-,$(ZEIMENA_TOLERANCES)) \
|
||||||
$(addprefix zeimena-visvalingam-,$(ZEIMENA_TOLERANCES)))
|
$(addprefix zeimena-visvalingam-,$(ZEIMENA_TOLERANCES)))
|
||||||
GEN2 = $(addsuffix .pdf, \
|
GEN2 = $(addsuffix .pdf, \
|
||||||
$(addprefix overlaid-zeimena-douglas-,$(CROSSING_TOLERANCES)) \
|
$(addprefix overlaid-zeimena-douglas-,$(CROSSING_TOLERANCES)) \
|
||||||
$(addprefix overlaid-zeimena-visvalingam-,$(CROSSING_TOLERANCES)) \
|
$(addprefix overlaid-zeimena-visvalingam-,$(CROSSING_TOLERANCES)) \
|
||||||
$(addprefix overlaid-sinewave-douglas-,$(SINEWAVE_TOLERANCES)) \
|
$(addprefix overlaid-sinewave2-douglas-,$(SINEWAVE_TOLERANCES)) \
|
||||||
$(addprefix overlaid-sinewave-visvalingam-,$(SINEWAVE_TOLERANCES)))
|
$(addprefix overlaid-sinewave2-visvalingam-,$(SINEWAVE_TOLERANCES)))
|
||||||
|
|
||||||
mj-referatas.pdf: mj-referatas.tex version.tex bib.bib zeimena.pdf \
|
mj-referatas.pdf: mj-referatas.tex version.tex bib.bib zeimena.pdf \
|
||||||
sinewave1.pdf sinewave2.pdf crossing.pdf $(GEN1) $(GEN2)
|
sinewave1.pdf sinewave2.pdf crossing.pdf $(GEN1) $(GEN2)
|
||||||
@ -35,8 +35,8 @@ $(1): $(2) ./layer2img.py
|
|||||||
./layer2img.py $(3) --group1-infile=$$< --outfile $(1)
|
./layer2img.py $(3) --group1-infile=$$< --outfile $(1)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call algo2img,sinewave,douglas,60x24))
|
$(eval $(call algo2img,sinewave2,douglas,60x24))
|
||||||
$(eval $(call algo2img,sinewave,visvalingam,60x24))
|
$(eval $(call algo2img,sinewave2,visvalingam,60x24))
|
||||||
$(eval $(call algo2img,zeimena,douglas,210x297))
|
$(eval $(call algo2img,zeimena,douglas,210x297))
|
||||||
$(eval $(call algo2img,zeimena,visvalingam,210x297))
|
$(eval $(call algo2img,zeimena,visvalingam,210x297))
|
||||||
$(eval $(call gpkg2pdf,sinewave1.pdf,sinewave1.gpkg,,--size=$(SINEWAVE_SIZE)))
|
$(eval $(call gpkg2pdf,sinewave1.pdf,sinewave1.gpkg,,--size=$(SINEWAVE_SIZE)))
|
||||||
@ -45,8 +45,8 @@ $(eval $(call gpkg2pdf,zeimena.pdf,zeimena.gpkg rectangle.gpkg,--size=134x191 --
|
|||||||
$(eval $(call gpkg2pdf,crossing.pdf,zeimena.gpkg,--size=105x74 --clip $(CROSSING)))
|
$(eval $(call gpkg2pdf,crossing.pdf,zeimena.gpkg,--size=105x74 --clip $(CROSSING)))
|
||||||
$(eval $(call algo2overlay,zeimena,douglas,--size 148x105 --clip $(CROSSING)))
|
$(eval $(call algo2overlay,zeimena,douglas,--size 148x105 --clip $(CROSSING)))
|
||||||
$(eval $(call algo2overlay,zeimena,visvalingam,--size 148x105 --clip $(CROSSING)))
|
$(eval $(call algo2overlay,zeimena,visvalingam,--size 148x105 --clip $(CROSSING)))
|
||||||
$(eval $(call algo2overlay,sinewave,douglas,--size $(SINEWAVE_SIZE)))
|
$(eval $(call algo2overlay,sinewave2,douglas,--size $(SINEWAVE_SIZE)))
|
||||||
$(eval $(call algo2overlay,sinewave,visvalingam,--size $(SINEWAVE_SIZE)))
|
$(eval $(call algo2overlay,sinewave2,visvalingam,--size $(SINEWAVE_SIZE)))
|
||||||
|
|
||||||
sinewave%.gpkg: fig2layer.py
|
sinewave%.gpkg: fig2layer.py
|
||||||
./fig2layer.py -o $@ sine --numwaves=$*
|
./fig2layer.py -o $@ sine --numwaves=$*
|
||||||
|
@ -164,7 +164,7 @@ Since the map area is large (approx. 20km by 28km, scale $1:300 000$), we will
|
|||||||
also review a subset of the area of approx 2200m by 1575m. The zoomed-in
|
also review a subset of the area of approx 2200m by 1575m. The zoomed-in
|
||||||
version will help explain some of the deficiencies in the reviewed algorithms.
|
version will help explain some of the deficiencies in the reviewed algorithms.
|
||||||
|
|
||||||
\begin{figure}[h]
|
\begin{figure}[H]
|
||||||
\centering
|
\centering
|
||||||
\includegraphics[width=67.5mm]{zeimena}
|
\includegraphics[width=67.5mm]{zeimena}
|
||||||
\caption{Lakaja and Žeimena, with marked river crossing area, $1:300 000$}
|
\caption{Lakaja and Žeimena, with marked river crossing area, $1:300 000$}
|
||||||
@ -200,7 +200,7 @@ bends to chopped lines. This is especially visible in tolerances 256 and 512.
|
|||||||
In a more robust simplification algorithm, the larger tolerance, the larger the
|
In a more robust simplification algorithm, the larger tolerance, the larger the
|
||||||
bends on the original map should be 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}}
|
||||||
\begin{tabularx}{\textwidth}{ p{2.1cm} | X | X | }
|
\begin{tabularx}{\textwidth}{ p{2.1cm} | X | X | }
|
||||||
Tolerance DP/VW &
|
Tolerance DP/VW &
|
||||||
@ -235,13 +235,9 @@ bends on the original map should be retained.
|
|||||||
\label{tab:comparison-zeimena}
|
\label{tab:comparison-zeimena}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
Let's zoom in to the river crossing area for some of the algorithms; see
|
To ease the discussion on shapes in the resulting output, it is useful to
|
||||||
table~\ref{tab:comparison-crossing} on page~\pageref{tab:comparison-crossing}.
|
define what a "blunt bend" is: it is a river bent that looks like a cutout from
|
||||||
|
a large circle, ilustrated in figure~\ref{fig:blunt-bent}.
|
||||||
Both {\VW} and {\DP} simplify "blunt" bends (a "blunt" bent looks like a cutout
|
|
||||||
from a large circle, see figure~\ref{fig:blunt-bent} on
|
|
||||||
page~\pageref{fig:blunt-bent}). This is not ideal, because large blunt bents
|
|
||||||
should be retained.
|
|
||||||
|
|
||||||
\begin{figure}[h]
|
\begin{figure}[h]
|
||||||
\centering
|
\centering
|
||||||
@ -254,6 +250,11 @@ should be retained.
|
|||||||
\label{fig:blunt-bent}
|
\label{fig:blunt-bent}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
|
Once zoomed in to the river crossing area with {\DP} and {\VW} applied, it becomes apparent that both large
|
||||||
|
blunts are normalized to single lines, the shape becomes jagged and unpleasant
|
||||||
|
for the eye. See table~\ref{tab:comparison-crossing} on
|
||||||
|
page~\pageref{tab:comparison-crossing}.
|
||||||
|
|
||||||
\begin{figure}[h]
|
\begin{figure}[h]
|
||||||
\renewcommand{\tabularxcolumn}[1]{>{\center\small}m{#1}}
|
\renewcommand{\tabularxcolumn}[1]{>{\center\small}m{#1}}
|
||||||
\begin{tabularx}{\textwidth}{ p{2.1cm} | X | X | }
|
\begin{tabularx}{\textwidth}{ p{2.1cm} | X | X | }
|
||||||
@ -278,21 +279,20 @@ should be retained.
|
|||||||
\label{tab:comparison-crossing}
|
\label{tab:comparison-crossing}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
|
There is another issue on the wishlist beyond jaggyness and loss of large bents
|
||||||
To sum up, both {\VW} and {\DP} simplify the lines, but their cartographic
|
-- combining close bends to larger ones.
|
||||||
output poorly represents lines and bends. Where to look for better output?
|
|
||||||
|
|
||||||
\subsection{Combining bends}
|
\subsection{Combining bends}
|
||||||
|
|
||||||
Consecutive small bends should be combined into larger bends, and that is one
|
|
||||||
of the least developed aspects of automatic line generalization, according to
|
|
||||||
\cite{miuller1995generalization}. {\WM} encoded this process to an algorithm.
|
|
||||||
|
|
||||||
Imagine there are two small bends close to each other, similar to
|
Imagine there are two small bends close to each other, similar to
|
||||||
figure~\ref{fig:sinewave} on page~\pageref{fig:sinewave}, and one needs to
|
figure~\ref{fig:sinewave2} on page~\pageref{fig:sinewave2}, and one needs to
|
||||||
generalize it. The bends are too large to ignore replace them with a straight
|
generalize it. The bends are too large to ignore replace them with a straight
|
||||||
line, but too small to retain both and retain their complexity.
|
line, but too small to retain both and retain their complexity.
|
||||||
|
|
||||||
|
According to cartographic generalization rules
|
||||||
|
(\cite{miuller1995generalization}), consecutive small bends should be combined
|
||||||
|
into larger bends. {\WM} encoded this process to an algorithm.
|
||||||
|
|
||||||
\begin{figure}[h]
|
\begin{figure}[h]
|
||||||
\centering
|
\centering
|
||||||
\includegraphics[width=52mm]{sinewave2}
|
\includegraphics[width=52mm]{sinewave2}
|
||||||
@ -301,39 +301,39 @@ line, but too small to retain both and retain their complexity.
|
|||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
When one applies {\DP} to figure~\ref{fig:sinewave2}, either both bends remain,
|
When one applies {\DP} to figure~\ref{fig:sinewave2}, either both bends remain,
|
||||||
or become a straight line, see table~\ref{tab:comparison-sinewave} on
|
or become a straight line, see table~\ref{tab:comparison-sinewave2} on
|
||||||
page~\pageref{tab:comparison-sinewave}.
|
page~\pageref{tab:comparison-sinewave2}.
|
||||||
|
|
||||||
\begin{figure}[h]
|
\begin{figure}[h]
|
||||||
\renewcommand{\tabularxcolumn}[1]{>{\center\small}m{#1}}
|
\renewcommand{\tabularxcolumn}[1]{>{\center\small}m{#1}}
|
||||||
\begin{tabularx}{\textwidth}{ p{1.5cm} | X | X | }
|
\begin{tabularx}{\textwidth}{ p{1.5cm} | X | X | }
|
||||||
Tolerance DP/VW &
|
Tolerance DP/VW &
|
||||||
Douglas \& Peucker &
|
Douglas \& Peucker &
|
||||||
Visvalingam-Whyatt \tabularnewline \hline
|
Visvalingam-Whyatt \tabularnewline \hline
|
||||||
|
|
||||||
2/4 &
|
2/4 &
|
||||||
\includegraphics[width=\linewidth]{overlaid-sinewave-douglas-2} &
|
\includegraphics[width=\linewidth]{overlaid-sinewave2-douglas-2} &
|
||||||
\includegraphics[width=\linewidth]{overlaid-sinewave-visvalingam-2} \tabularnewline \hline
|
\includegraphics[width=\linewidth]{overlaid-sinewave2-visvalingam-2} \tabularnewline \hline
|
||||||
|
|
||||||
16/256 &
|
16/256 &
|
||||||
\includegraphics[width=\linewidth]{overlaid-sinewave-douglas-16} &
|
\includegraphics[width=\linewidth]{overlaid-sinewave2-douglas-16} &
|
||||||
\includegraphics[width=\linewidth]{overlaid-sinewave-visvalingam-16} \tabularnewline \hline
|
\includegraphics[width=\linewidth]{overlaid-sinewave2-visvalingam-16} \tabularnewline \hline
|
||||||
|
|
||||||
32/1024 &
|
32/1024 &
|
||||||
\includegraphics[width=\linewidth]{overlaid-sinewave-douglas-32} &
|
\includegraphics[width=\linewidth]{overlaid-sinewave2-douglas-32} &
|
||||||
\includegraphics[width=\linewidth]{overlaid-sinewave-visvalingam-32} \tabularnewline \hline
|
\includegraphics[width=\linewidth]{overlaid-sinewave2-visvalingam-32} \tabularnewline \hline
|
||||||
|
|
||||||
40/1600 &
|
40/1600 &
|
||||||
\includegraphics[width=\linewidth]{overlaid-sinewave-douglas-40} &
|
\includegraphics[width=\linewidth]{overlaid-sinewave2-douglas-40} &
|
||||||
\includegraphics[width=\linewidth]{overlaid-sinewave-visvalingam-40} \tabularnewline \hline
|
\includegraphics[width=\linewidth]{overlaid-sinewave2-visvalingam-40} \tabularnewline \hline
|
||||||
|
|
||||||
\end{tabularx}
|
\end{tabularx}
|
||||||
\caption{{\DP} and {\VW} on example wave}
|
\caption{{\DP} and {\VW} on example wave}
|
||||||
\label{tab:comparison-sinewave}
|
\label{tab:comparison-sinewave2}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
Ideally, the double-bend in figure~\ref{fig:sinewave2} should be normalized to a
|
Ideally, the double-bend in figure~\ref{fig:sinewave2} should be normalized to
|
||||||
larger single-bend, similar to figure~\ref{fig:sinewave1} on
|
a larger single-bend, similar to figure~\ref{fig:sinewave1} on
|
||||||
page~\pageref{fig:sinewave2}.
|
page~\pageref{fig:sinewave2}.
|
||||||
|
|
||||||
\begin{figure}[h]
|
\begin{figure}[h]
|
||||||
@ -343,6 +343,39 @@ page~\pageref{fig:sinewave2}.
|
|||||||
\label{fig:sinewave1}
|
\label{fig:sinewave1}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
|
To recap, both {\VW} and {\DP} simplify the lines, but their cartographic
|
||||||
|
output, when zoomed in, looks poorly to the human eye. Can a better solution be
|
||||||
|
found?
|
||||||
|
|
||||||
|
\section{Recommendation}
|
||||||
|
\label{sec:recommendation}
|
||||||
|
|
||||||
|
So far, we have reviewed two widely available open-source generalization
|
||||||
|
algorithms {\DP} and {\VW}, and now can enumerate the shortcomings:
|
||||||
|
\begin{itemize}
|
||||||
|
\item Resulting generalized lines look jaggy and, when zoomed in,
|
||||||
|
unpleasant to the eye.
|
||||||
|
\item Blunt bends are generalized to straight lines, even though sometimes
|
||||||
|
they should remain blunt bends (or even exhagerated bends).
|
||||||
|
\item Consecutive small bends should be normalized into a larger bend.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
According to \cite{wang1998line}, their algorithm fixes all 3 issues above. The
|
||||||
|
algorithm is relatively simple to understand for a non-expert cartographer
|
||||||
|
software developer, and thus should be feasible to implement in a few weeks.
|
||||||
|
|
||||||
|
\section{Conclusions}
|
||||||
|
\label{sec:conclusions}
|
||||||
|
|
||||||
|
We have evaluated two readily available line simplification algorithms using a
|
||||||
|
river sample and a synthetic bend: {\VW} and {\DP}. Once looking at the
|
||||||
|
examples, it is quite easy to see the most glaring deficiencies when applying
|
||||||
|
those two for comparing cartographic generalization.
|
||||||
|
|
||||||
|
We are suggesting to complement open-source list of
|
||||||
|
available algorithms with {\WM}, which was created for cartographic
|
||||||
|
generalization, and should fix the shortcomings identified in this paper.
|
||||||
|
|
||||||
\section{Related Work and future suggestions}
|
\section{Related Work and future suggestions}
|
||||||
\label{sec:related_work}
|
\label{sec:related_work}
|
||||||
|
|
||||||
@ -356,13 +389,6 @@ As noted in parameter~\ref{itm:2} on page~\pageref{itm:2}, it would be useful
|
|||||||
to have a formula mapping {\DP} tolerance to {\VW}. That way, visual
|
to have a formula mapping {\DP} tolerance to {\VW}. That way, visual
|
||||||
comparisons between line simplification algorithms could be more objective.
|
comparisons between line simplification algorithms could be more objective.
|
||||||
|
|
||||||
\section{Conclusions}
|
|
||||||
\label{sec:conclusions}
|
|
||||||
|
|
||||||
We have practically evaluated two readily available line simplification
|
|
||||||
algorithms with a river sample: {\VW} and {\DP}, and outlined their
|
|
||||||
deficiencies. We are suggesting to implement {\WM} and compare it to the other
|
|
||||||
two.
|
|
||||||
|
|
||||||
\printbibliography
|
\printbibliography
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user