From f91824d1cb50148c73548fcfc0342667cd15bd5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Thu, 1 Apr 2021 16:13:29 +0300 Subject: [PATCH] add sections --- IV/extract-and-generate | 32 ++++++++-------------------- IV/mj-msc.tex | 47 +++++++++++++++++++++++++++++++++++------ 2 files changed, 49 insertions(+), 30 deletions(-) diff --git a/IV/extract-and-generate b/IV/extract-and-generate index 726b027..266f972 100755 --- a/IV/extract-and-generate +++ b/IV/extract-and-generate @@ -1,27 +1,13 @@ #!/bin/bash set -euo pipefail - dir=$(mktemp -d) -fname=mj-msc-all.pdf - -echo "Extracting all files from $fname to $dir ..." -pdfdetach -saveall -o "$dir" "$fname" - -echo "Generating $dir/$fname..." -fail=0 -make -C "$dir" -j $(nproc) "$fname" > "$dir/make.log" 2>&1 || fail=1 - -if [[ $fail == 1 ]]; then - >&2 echo "Generation failed. Here are the last 10 log lines:" - tail -10 "$dir/make.log" +fname=${1:-mj-msc-all.pdf} +echo "Extracting $fname to $dir/" && pdfdetach -saveall -o "$dir" "$fname" +echo "Generating $dir/$fname ..." +make -j $(nproc) -C "$dir" "$fname" &> "$dir/make.log" || { + echo "Generation failed. Here are the last 20 log lines:" + tail -20 "$dir/make.log" exit 1 -fi - -open=open -[[ $(uname) == Linux ]] && open=xdg-open - -echo "Opening $dir/$fname ..." -"$open" "$dir/$fname" - -echo "Editor has been closed. Removing $dir" -rm -fr "$dir" +} +echo "Opening $dir/$fname ..." && xdg-open "$dir/$fname" +echo "File has been closed. Removing $dir" && rm -fr "$dir" diff --git a/IV/mj-msc.tex b/IV/mj-msc.tex index 979c876..bfe3f15 100644 --- a/IV/mj-msc.tex +++ b/IV/mj-msc.tex @@ -173,8 +173,8 @@ 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 +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 @@ -185,6 +185,37 @@ as a whole. \section{Methodology} \label{sec:methodology} +In this paper we describe {\WM} in a detail that is more useful for algorithm +developers than the original \cite{wang1998line}: sections will be expanded, +with more detailed illustrations next to the descriptions. + + +\subsection{Automated tests} + +\section{Description of the implementation} + +\subsection{Definition of a Bend} + +\subsection{Gentle Inflection at End of a Bend} + +\subsection{Self-line Crossing When Cutting a Bend} + +\subsection{Attributes of a Single Bend} + +\subsection{Shape of a Bend} + +\subsection{The Context of a Bend: Isolated and Similar Bends} + +\subsection{Elimination Operator} + +\subsection{Combination Operator} + +\subsection{Exaggeration Operator} + +\section{Program Implementation} + +\section{Results of Experiments} + \section{Conclusions} \label{sec:conclusions} @@ -197,15 +228,17 @@ as a whole. \section{Code listings} -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: +We strongly believe in the ability to reproduce the results is critical for any + scientific work. To make it possible for this paper, all source files and + accompanying scripts have been attached to the PDF. To preview the code + listings and re-generate this document (also, re-generate the included + graphics), run this script (assuming name of this document is {\tt + mj-msc-all.pdf}): \inputminted[fontsize=\small]{bash}{extract-and-generate} A reasonably up-to-date Linux or OS X system with a working Docker installation -is required to re-generate this document. +is required. \end{appendices} \end{document}