a5
This commit is contained in:
parent
1ba8e26957
commit
c480c8543e
@ -6,30 +6,32 @@ GEN = $(addsuffix .pdf, \
|
|||||||
$(addprefix zeimena-douglas-,$(ZEIMENA_TOLERANCES)) \
|
$(addprefix zeimena-douglas-,$(ZEIMENA_TOLERANCES)) \
|
||||||
$(addprefix zeimena-visvalingam-,$(ZEIMENA_TOLERANCES)))
|
$(addprefix zeimena-visvalingam-,$(ZEIMENA_TOLERANCES)))
|
||||||
|
|
||||||
mj-referatas.pdf: mj-referatas.tex version.tex bib.bib zeimena-pretty.pdf \
|
mj-referatas.pdf: mj-referatas.tex version.tex bib.bib zeimena.pdf sinewave.pdf $(GEN)
|
||||||
sinewave.pdf $(GEN)
|
|
||||||
latexmk -g -pdf $<
|
latexmk -g -pdf $<
|
||||||
|
|
||||||
define algo2img
|
define algo2img
|
||||||
db/.faux_$(1)-$(2)-%: $(2).sql db/.faux_ready
|
db/.faux_$(1)-$(2)-%: $(2).sql db/.faux_ready
|
||||||
./managedb -- --echo-all -v ON_ERROR_STOP=1 -v src=$(1) -v tolerance=$$* -v tbl=$(1)_$(2)_$$* -f $(2).sql
|
./managedb -- --echo-all -v ON_ERROR_STOP=1 -v src=$(1) -v tolerance=$$* -v tbl=$(1)_$(2)_$$* -f $(2).sql
|
||||||
touch $$@
|
touch $$@
|
||||||
|
|
||||||
$(1)-$(2)-%.pdf: layer2img.py db/.faux_$(1)-$(2)-%
|
$(1)-$(2)-%.pdf: layer2img.py db/.faux_$(1)-$(2)-%
|
||||||
./layer2img.py --table=$(1)_$(2)_$$* --size=$(3) --outfile $(1)-$(2)-$$*.pdf
|
./layer2img.py --table=$(1)_$(2)_$$* --size=$(3) --outfile $(1)-$(2)-$$*.pdf
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define gpkg2pdf
|
||||||
|
$(1).pdf: $(1).gpkg
|
||||||
|
./layer2img.py --size=$(2) --infile=$(1).gpkg --outfile $(1).pdf
|
||||||
|
endef
|
||||||
|
|
||||||
$(eval $(call algo2img,sinewave,douglas,52x12))
|
$(eval $(call algo2img,sinewave,douglas,52x12))
|
||||||
$(eval $(call algo2img,sinewave,visvalingam,52x12))
|
$(eval $(call algo2img,sinewave,visvalingam,52x12))
|
||||||
$(eval $(call algo2img,zeimena,douglas,52x74))
|
$(eval $(call algo2img,zeimena,douglas,52x74))
|
||||||
$(eval $(call algo2img,zeimena,visvalingam,52x74))
|
$(eval $(call algo2img,zeimena,visvalingam,52x74))
|
||||||
|
$(eval $(call gpkg2pdf,sinewave,52x15))
|
||||||
|
$(eval $(call gpkg2pdf,zeimena,148x210))
|
||||||
|
|
||||||
sinewave.gpkg: sinewave.py
|
sinewave.gpkg: sinewave.py
|
||||||
./sinewave.py
|
./sinewave.py
|
||||||
|
|
||||||
sinewave.pdf: sinewave.gpkg
|
|
||||||
./layer2img.py --size=52x15 --infile=$< --outfile=$@
|
|
||||||
|
|
||||||
db/.faux_ready: zeimena.gpkg sinewave.gpkg managedb
|
db/.faux_ready: zeimena.gpkg sinewave.gpkg managedb
|
||||||
-./managedb stop; rm -fr db
|
-./managedb stop; rm -fr db
|
||||||
./managedb init
|
./managedb init
|
||||||
|
@ -35,17 +35,6 @@ def parse_args():
|
|||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
#def makebox(t):
|
|
||||||
# xmin, ymin, xmax, ymax = t
|
|
||||||
# if xmin > xmax:
|
|
||||||
# raise Exception("xmin should be > xmax")
|
|
||||||
# if ymin > ymax:
|
|
||||||
# raise Exception("ymin should be > ymax")
|
|
||||||
# left, bottom = xmin, ymin
|
|
||||||
# width, height = xmax - xmin, ymax - ymin
|
|
||||||
# return {'left': left, 'bottom': bottom, 'width': width, 'height': height}
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
args = parse_args()
|
args = parse_args()
|
||||||
if args.table:
|
if args.table:
|
||||||
@ -57,13 +46,13 @@ def main():
|
|||||||
f.plot(figsize=args.size)
|
f.plot(figsize=args.size)
|
||||||
ax = plt.gca()
|
ax = plt.gca()
|
||||||
if args.clip:
|
if args.clip:
|
||||||
ax.set_ylim(bottom=args.clip[1], top=args.clip[3])
|
|
||||||
ax.set_xlim(left=args.clip[0], right=args.clip[2])
|
ax.set_xlim(left=args.clip[0], right=args.clip[2])
|
||||||
|
ax.set_ylim(bottom=args.clip[1], top=args.clip[3])
|
||||||
ax.axis('off')
|
ax.axis('off')
|
||||||
ax.margins(0, 0)
|
ax.margins(0, 0)
|
||||||
plt.tight_layout(0)
|
plt.tight_layout(0)
|
||||||
if args.outfile:
|
if args.outfile:
|
||||||
plt.savefig(args.outfile, bbox_inches=0, dpi=300)
|
plt.savefig(args.outfile, bbox_inches=0, dpi=600)
|
||||||
else:
|
else:
|
||||||
plt.show()
|
plt.show()
|
||||||
|
|
||||||
|
@ -42,6 +42,7 @@ small scale: 1:XXXXXX
|
|||||||
large scale: 1:XXX
|
large scale: 1:XXX
|
||||||
|
|
||||||
a4: 210x297mm
|
a4: 210x297mm
|
||||||
|
a5: 148x210mm
|
||||||
a6: 105x148xmm
|
a6: 105x148xmm
|
||||||
a7: 74x105mm
|
a7: 74x105mm
|
||||||
a8: 52x74mm
|
a8: 52x74mm
|
||||||
@ -152,12 +153,12 @@ algorithms, because the river exhibits both both straight and curved shape, is
|
|||||||
a combination of two curly rivers, and author's familiarity with the location.
|
a combination of two curly rivers, and author's familiarity with the location.
|
||||||
|
|
||||||
Since the map area is large (scale $1:150 000$), we will also review a
|
Since the map area is large (scale $1:150 000$), we will also review a
|
||||||
zoomed-in subset of the map of scale $1:10 000$. The zoomed-in version will
|
zoomed-in subset of the map of scale $1:15 000$. The zoomed-in version will
|
||||||
help explain some of the deficiencies in the reviewed algorithms.
|
help explain some of the deficiencies in the reviewed algorithms.
|
||||||
|
|
||||||
\begin{figure}[H]
|
\begin{figure}[H]
|
||||||
\centering
|
\centering
|
||||||
\includegraphics[width=148mm]{zeimena-pretty}
|
\includegraphics[width=148mm]{zeimena}
|
||||||
\caption{Lakaja and Žeimena}
|
\caption{Lakaja and Žeimena}
|
||||||
\label{fig:zeimena}
|
\label{fig:zeimena}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
|
Loading…
Reference in New Issue
Block a user