stud/IV/mj-msc.tex

198 lines
6.6 KiB
TeX
Raw Normal View History

2021-03-30 17:37:13 +03:00
\documentclass[a4paper]{article}
\iffalse
\usepackage[L7x,T1]{fontenc}
\usepackage[lithuanian]{babel}
\else
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\fi
\usepackage[utf8]{inputenc}
\usepackage{a4wide}
\usepackage{csquotes}
\usepackage[maxbibnames=99,style=authoryear]{biblatex}
\usepackage[pdfusetitle]{hyperref}
\usepackage{enumitem}
\usepackage[toc,page,title]{appendix}
\addbibresource{bib.bib}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{gensymb}
\usepackage{varwidth}
\usepackage{tabularx}
\usepackage{float}
\usepackage{tikz}
\usepackage{minted}
\usetikzlibrary{er,positioning}
\definecolor{mypurple}{RGB}{117,112,179}
\input{version}
\newcommand{\DP}{Douglas \& Peucker}
\newcommand{\VW}{Visvalingam--Whyatt}
\newcommand{\WM}{Wang--M{\"u}ller}
\title{
2021-04-01 09:42:08 +03:00
\includegraphics[width=60mm]{vu.png}\\[8ex]
2021-03-30 17:37:13 +03:00
Cartographic Generalization of Lines using free software \\
2021-04-01 15:32:16 +03:00
(example of rivers)
2021-03-30 17:37:13 +03:00
}
\author{Motiejus Jakštys}
\date{
2021-04-01 09:42:08 +03:00
\VCDescribe
2021-03-30 17:37:13 +03:00
}
\begin{document}
2021-04-01 15:32:16 +03:00
\clearpage\maketitle
\thispagestyle{empty}
2021-03-30 17:37:13 +03:00
\begin{abstract}
\label{sec:abstract}
Current open-source line generalization solutions have their roots in
mathematics and geometry, and are not fit for natural objects like rivers
2021-04-01 09:42:08 +03:00
and coastlines. This paper discusses our implementation of {\WM} algorithm
2021-03-30 17:37:13 +03:00
under and open-source license, explains things that we would had
appreciated in the original paper and compares our results to different
generalization algorithms.
\end{abstract}
\newpage
\tableofcontents
\listoffigures
\newpage
\section{Introduction}
\label{sec:introduction}
2021-04-01 09:42:08 +03:00
When creating small-scale maps, often the detail of the data source is greater
than desired for the map. This becomes especially acute for natural features
that have many bends, like coastlines, rivers and forest boundaries.
To create a small-scale map from a large-scale data source, these features need
to be generalized: detail should be reduced. However, while doing so, it is
important to preserve the "defining" shape of the original feature, otherwise
the result will look unrealistic.
For example, if a river is nearly straight, it should be nearly straight after
generalization, otherwise a too straightened river will look like a canal.
Conversely, if the river is highly wiggly, the number of bends should be
reduced, but not removed.
Generalization problem for other objects can often be solved by other
non-geometric means:
\begin{itemize}
\item Towns and cities can be filtered and generalized by number of
inhabitants.
\item Roads can be eliminated by the road length, number of lanes, or
classification of the road (local, regional, international).
\end{itemize}
Natural line generalization problem can be viewed as having two competing
goals:
\begin{itemize}
\item Reduce detail by removing or simplifying "less important" features.
\item Retain enough detail, so the original is still recognize-able.
\end{itemize}
Given the discussed complexities, a fine line between under-generalization
(leaving object as-is) and over-generalization (making a straight line) must be
found. Therein lies the complexity of generalization algorithms: all have
different trade-offs.
\section{Literature review}
\label{sec:literature-review}
A number of cartographic line generalization algorithms have been researched.
The "classical" ones are {\DP} and {\VW}.
\subsection{{\DP} and {\VW}}
\cite{douglas1973algorithms} and \cite{visvalingam1993line} are "classical"
line generalization computer graphics algorithms. They are relatively simple to
implement, require few runtime resources. Both of them accept only a single
2021-04-01 15:32:16 +03:00
parameter, based on desired scale of the map, which makes them very simple to
adjust for different scales.
2021-04-01 09:42:08 +03:00
2021-04-01 15:32:16 +03:00
Both algorithms are part of PostGIS, a free-software GIS suite:
\begin{itemize}
\item \cite{douglas1973algorithms} via
\href{https://postgis.net/docs/ST_Simplify.html}{PostGIS Simplify}.
2021-04-01 09:42:08 +03:00
2021-04-01 15:32:16 +03:00
\item \cite{visvalingam1993line} via
\href{https://postgis.net/docs/ST_SimplifyVW.html}{PostGIS SimplifyVW}.
\end{itemize}
2021-04-01 09:42:08 +03:00
2021-04-01 15:32:16 +03:00
Since both algorithms produce jagged output lines, it is worthwhile to process
those through a widely available \cite{chaikin1974algorithm} smoothing
algorithm via \href{https://postgis.net/docs/ST_ChaikinSmoothing.html}{PostGIS
ChaikinSmoothing}.
2021-04-01 09:42:08 +03:00
2021-04-01 15:32:16 +03:00
Even though {\DP} and {\VW} are simple to understand and computationally
efficient, they have serious deficiencies for cartographic natural line
generalization.
<TODO: expand on deficiencies>
\subsection{Modern approaches}
Due to their simplicity and ubiquity, {\DP} and {\VW} have been established as
go-to algorithms for line generalization. During recent years, more modern
replacement algorithms have emerged. These fall into roughly two categories:
2021-04-01 09:42:08 +03:00
2021-03-30 17:37:13 +03:00
\begin{itemize}
\item Cartographic knowledge was encoded to an algorithm (bottom-up
approach). One among these are \cite{wang1998line}.
2021-04-01 09:42:08 +03:00
\item Mathematical shape transformation which yields a more cartographic
result. E.g. \cite{jiang2003line}, \cite{dyken2009simultaneous},
\cite{mustafa2006dynamic}, \cite{nollenburg2008morphing}.
2021-03-30 17:37:13 +03:00
\end{itemize}
2021-04-01 15:32:16 +03:00
Authors of most of the aforementioned articles have implemented the
generalization algorithm, at least to generate the visuals in the articles.
However, I wasn't able to find code for any of those to evaluate with my
desired data set, or use as a basis for my own maps. \cite{wang1998line} is
available in a commercial product.
The lack of robust openly available generalization algorithm implementations
poses a problem for map creation with free software: there is not a similar
high-quality simplification algorithm to create down-scaled maps, so any
cartographic work, which uses line generalization as part of its processing,
will be of sub-par quality. We believe that availability of high-quality
open-source tools is an important foundation for future cartographic
experimentation and development, thus it it benefits the cartographic society
as a whole.
2021-03-30 17:37:13 +03:00
2021-04-01 09:42:08 +03:00
\section{Methodology}
\label{sec:methodology}
2021-03-30 17:37:13 +03:00
\section{Conclusions}
\label{sec:conclusions}
\section{Related Work and future suggestions}
\label{sec:related_work}
\printbibliography
\begin{appendices}
\section{Code listings}
2021-03-31 15:30:14 +03:00
We strongly believe ability to reproduce the results is critical for any
scientific work. To make it possible for this algorithm, all source
files and accompanying scripts have been attached to the PDF. To preview
the code listings and re-generate this document, run this simple script:
2021-03-30 17:37:13 +03:00
2021-03-31 15:12:42 +03:00
\inputminted[fontsize=\small]{bash}{extract-and-generate}
2021-03-30 17:37:13 +03:00
2021-03-31 15:30:14 +03:00
A reasonably up-to-date Linux or OS X system with a working Docker installation
is required to re-generate this document.
2021-03-30 17:37:13 +03:00
\end{appendices}
\end{document}