diff --git a/II/Referatas/Makefile b/II/Referatas/Makefile index 4e6a8d4..c45349b 100644 --- a/II/Referatas/Makefile +++ b/II/Referatas/Makefile @@ -7,7 +7,8 @@ GEN = $(addsuffix .pdf, \ $(addprefix zeimena-douglas-,$(ZEIMENA_TOLERANCES)) \ $(addprefix zeimena-visvalingam-,$(ZEIMENA_TOLERANCES))) -mj-referatas.pdf: mj-referatas.tex version.tex bib.bib zeimena.pdf sinewave.pdf $(GEN) +mj-referatas.pdf: mj-referatas.tex version.tex bib.bib zeimena.pdf \ + sinewave.pdf crossing.pdf $(GEN) latexmk -g -pdf $< define algo2img @@ -21,16 +22,17 @@ crossing-$(1)-$(2)-%.pdf: layer2img.py db/.faux_$(1)-$(2)-% endef define gpkg2pdf -$(1).pdf: $(1).gpkg - ./layer2img.py $(2) --infile=$(1).gpkg --outfile $(1).pdf +$(2): $(1) + ./layer2img.py $(3) --infile=$(1) --outfile $(2) endef $(eval $(call algo2img,sinewave,douglas,52x12)) $(eval $(call algo2img,sinewave,visvalingam,52x12)) $(eval $(call algo2img,zeimena,douglas,52x74)) $(eval $(call algo2img,zeimena,visvalingam,52x74)) -$(eval $(call gpkg2pdf,sinewave,--size=52x15)) -$(eval $(call gpkg2pdf,zeimena,--size=148x210 --rect $(CROSSING))) +$(eval $(call gpkg2pdf,sinewave.gpkg,sinewave.pdf,--size=52x15)) +$(eval $(call gpkg2pdf,zeimena.gpkg,zeimena.pdf,--size=148x210 --rect $(CROSSING))) +$(eval $(call gpkg2pdf,zeimena.gpkg,crossing.pdf,--size=105x74 --clip $(CROSSING))) sinewave.gpkg: sinewave.py ./sinewave.py diff --git a/II/Referatas/layer2img.py b/II/Referatas/layer2img.py index ca3301b..fdfbb54 100755 --- a/II/Referatas/layer2img.py +++ b/II/Referatas/layer2img.py @@ -48,16 +48,15 @@ def main(): else: f = geopandas.read_file(args.infile) fig, ax = plt.subplots() - f.plot(ax=ax, figsize=args.size) + fig.set_size_inches(args.size) + f.plot(ax=ax) if c := args.clip: ax.set_xlim(left=c[0], right=c[2]) ax.set_ylim(bottom=c[1], top=c[3]) if r := args.rect: w, h = r[2] - r[0], r[3] - r[1] rect = patches.Rectangle( - (r[0], r[1]), - w, h, - linewidth=1,edgecolor='r',facecolor='none') + (r[0], r[1]), w, h, linewidth=1,edgecolor='r',facecolor='none') ax.add_patch(rect) ax.axis('off') diff --git a/II/Referatas/mj-referatas.tex b/II/Referatas/mj-referatas.tex index 059a9e0..0934c63 100644 --- a/II/Referatas/mj-referatas.tex +++ b/II/Referatas/mj-referatas.tex @@ -163,6 +163,14 @@ help explain some of the deficiencies in the reviewed algorithms. \label{fig:zeimena} \end{figure} +\begin{figure}[h] + \centering + \includegraphics[width=74mm]{crossing} + \caption{River crossing zoomed in} + \label{fig:crossing} +\end{figure} + + To visually evaluate the Žeimena sample, examples for {\DP} and {\VW} were created using the following parameters: