first test figure

This commit is contained in:
Motiejus Jakštys 2021-04-01 19:30:20 +03:00
parent 896b4a2714
commit 56318e1596
3 changed files with 28 additions and 16 deletions

View File

@ -5,15 +5,13 @@ SLIDES = slides-2021-03-29.pdf
NON_ARCHIVABLES = notes.txt referatui.txt slides-2021-03-29.txt
ARCHIVABLES = $(filter-out $(NON_ARCHIVABLES),$(shell git ls-files .))
GIT_DEP=
ifeq ($(shell git rev-parse --is-inside-git-dir),true)
GIT_DEP=$(shell git rev-parse --show-toplevel)/.git
else
GIT_DEP=
endif
.PHONY: test
test: tests.sql .faux.db
./db -f tests.sql
test: .faux_test
.PHONY: test-integration
test-integration: .faux_filter-rivers
@ -22,7 +20,8 @@ test-integration: .faux_filter-rivers
.PHONY: clean
clean:
-./db stop
-rm .faux_filter-rivers .faux_import-osm .faux.db $(SLIDES)
-rm .faux_test .faux_filter-rivers .faux_import-osm .faux.db \
$(SLIDES)
.PHONY: clean-tables
clean-tables:
@ -33,7 +32,7 @@ clean-tables:
.PHONY: slides
slides: $(SLIDES)
mj-msc.pdf: mj-msc.tex version.tex bib.bib
mj-msc.pdf: mj-msc.tex test-figures.pdf version.tex bib.bib
latexmk -shell-escape -g -pdf $<
mj-msc-all.pdf: mj-msc.pdf version.tex $(ARCHIVABLES)
@ -45,11 +44,12 @@ mj-msc-all.pdf: mj-msc.pdf version.tex $(ARCHIVABLES)
done
mv .tmp-$@ $@
slides-2021-03-29.pdf: slides-2021-03-29.txt
pandoc -t beamer -i $< -o $@
test-figures.pdf: layer2img.py tests.sql
python ./layer2img.py --group1-table=figures --outfile=$@
slides-2021-03-29.html: slides-2021-03-29.txt
pandoc --verbose -t slidy --self-contained $< -o $@ $(SLIDY_ARGS)
.faux_test: tests.sql wm.sql .faux.db
./db -f tests.sql
touch $@
.faux_filter-rivers: .faux_import-osm
./db -v where="$(WHERE)" -f aggregate-rivers.sql
@ -74,3 +74,10 @@ version.tex: Makefile $(GIT_DEP)
( \
TZ=UTC date '+\gdef\VCDescribe{%F ($(REF))}%'; \
) > $@
# slides
slides-2021-03-29.pdf: slides-2021-03-29.txt
pandoc -t beamer -i $< -o $@
slides-2021-03-29.html: slides-2021-03-29.txt
pandoc --verbose -t slidy --self-contained $< -o $@ $(SLIDY_ARGS)

View File

@ -142,7 +142,7 @@ def add_lines(ax, group):
for geom in getattr(g, 'geoms', [g]):
x, y = zip(*geom.coords)
narrs = geom.length / 16
arrowplot(ax, np.array(x), np.array(y), narrs=narrs)
#arrowplot(ax, np.array(x), np.array(y), narrs=narrs)
def main():
args = parse_args()
@ -159,10 +159,10 @@ def main():
ax.set_ylim(bottom=c[1], top=c[3])
if group1 is not None:
group1.plot(ax=ax, color=PURPLE)
group1.plot(ax=ax, color=ORANGE)
add_lines(ax, group1)
if group2 is not None:
group2.plot(ax=ax, color=ORANGE)
group2.plot(ax=ax, color=PURPLE)
add_lines(ax, group2)
if group3 is not None:
group3.plot(ax=ax, color=GREEN)

View File

@ -155,8 +155,8 @@ generalization.
\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:
go-to algorithms for line generalization. During recent years, alternatives
have emerged. These modern replacements fall into roughly two categories:
\begin{itemize}
\item Cartographic knowledge was encoded to an algorithm (bottom-up
@ -204,7 +204,12 @@ The full test suite can be executed with a single command, and completes in a
few seconds. Having an easily accessible test suite boosts confidence that no
unexpected regressions have been added while modifying the algorithm.
<TODO: expand with a screenshot>
\begin{figure}[H]
\centering
\includegraphics[width=\linewidth]{test-figures}
\caption{Visualized figures for automated text cases}
\label{fig:test-figures}
\end{figure}
\section{Description of the implementation}