diff --git a/II/Referatas/Makefile b/II/Referatas/Makefile index 8d3c417..71eb0af 100644 --- a/II/Referatas/Makefile +++ b/II/Referatas/Makefile @@ -4,7 +4,7 @@ GEN = $(addsuffix .pdf, \ $(addprefix zeimena-visvalingam-,$(TOLERANCES))) mj-referatas.pdf: mj-referatas.tex version.tex bib.bib zeimena-pretty.pdf \ - sinewave-douglas-100.pdf $(GEN) + sinewave.pdf sinewave-douglas-5.pdf $(GEN) latexmk -g -pdf $< define algo2img @@ -16,13 +16,16 @@ $(1)-$(2)-$(3).pdf: layer2img.py db/.faux_$(1)-$(2)-$(3) ./layer2img.py --table=$(1)_$(2)_$(3) --size=52x74 --outfile $(1)-$(2)-$(3).pdf endef -$(eval $(call algo2img,sinewave,douglas,100)) +$(eval $(call algo2img,sinewave,douglas,5)) $(foreach t,$(TOLERANCES),$(eval $(call algo2img,zeimena,douglas,$(t)))) $(foreach t,$(TOLERANCES),$(eval $(call algo2img,zeimena,visvalingam,$(t)))) sinewave.gpkg: sinewave.py ./sinewave.py +sinewave.pdf: sinewave.gpkg + ./layer2img.py --size=52x15 --infile=$< --outfile=$@ + db/.faux_ready: zeimena.gpkg sinewave.gpkg managedb -./managedb stop; rm -fr db ./managedb init diff --git a/II/Referatas/bib.bib b/II/Referatas/bib.bib index 297bd84..83865cd 100644 --- a/II/Referatas/bib.bib +++ b/II/Referatas/bib.bib @@ -45,6 +45,14 @@ publisher={John Wiley and Sons} } +@article{miuller1995generalization, + title={Generalization-state of the art and issues}, + author={Miuller, JC and Weibel, R and Lagrange, J and {\"E}alge, F}, + journal={GIS and Generalisation: Methodology and Practice}, + pages={3--17}, + year={1995} +} + @inproceedings{mcmaster1992generalization, title={Generalization in digital cartography}, author={McMaster, Robert Brainerd and Shea, K Stuart}, diff --git a/II/Referatas/mj-referatas.tex b/II/Referatas/mj-referatas.tex index 7a82948..817014e 100644 --- a/II/Referatas/mj-referatas.tex +++ b/II/Referatas/mj-referatas.tex @@ -52,6 +52,16 @@ connect rivers first to a single polylines: ideal hypothesis: mueller algorithm + topology may fully realize cartographic generalization tasks. what scales and what distances? + += Intro: Aktualumas +FOSS nėra realizuotas tinkamas kartografinio realizavimo algoritmas (2–3 sakiniai). Kad kartografai turėtų +įrankį upių generalizavimui. + +Bazė: imame tai, ką dabar turi kartografai įrankių paletėj. + +Imti mažus upės vingius. Paimti mažas atkarpėles ir palyginti su originalia. +Todėl, kad nėra kilpų. + \fi \author{Motiejus Jakštys} @@ -203,11 +213,11 @@ retained. To sum up, both {\VW} and {\DP} simplify the lines, but their cartographic output poorly represents lines and bends. Where to look for better output? -\section{Suggested alternative} -\label{sec:suggested_alternative} +\subsection{Combining bends} -{\WM} observed how professional cartographers are simplifying rivers and encoded it -to an algorithm which can be implemented by a computer. +Consecutive small bends should be combined into larger bends, and that is one +of the least developed aspects of automatic line generalization, according to +\cite{miuller1995generalization}. {\WM} encoded this process to an algorithm. Imagine there are two small bends close to each other, similar to figure~\ref{pic:example-bend} on page~\pageref{pic:example-bend}, and one needs @@ -216,22 +226,20 @@ straight line, but too small to retain both and retain their complexity. \begin{figure}[h] \centering - \begin{tikzpicture}[xscale=.5] - \draw (-4,-1) -- (-1, -1); - \draw (-1,-1) cos (0,0) sin (1,1) cos (2,0) sin (3,-1) cos (4,0) sin (5,1) cos(6,0) sin (7,-1); - \draw (7,-1) -- (10, -1); - \end{tikzpicture} + \includegraphics[width=52mm]{sinewave} \caption{Example river bend that should be generalized} - \label{pic:example-bend} + \label{pic:sinewave} \end{figure} -We would imagine +When one applies {\DP} to figure~\ref{pic:sinewave}, either both bends remain, +or become a straight line. -\begin{itemize} - \item Describe algorithm by {\WM}. - \item Explain how outputs will differ. - \item Explain implementation plan? -\end{itemize} +\begin{figure}[h] + \centering + \includegraphics[width=52mm]{sinewave-douglas-5} + \caption{Example bend, generalized} + \label{pic:sinewave-douglas-5} +\end{figure} \section{Related Work and future suggestions} \label{sec:related_work} diff --git a/II/Referatas/sinewave.py b/II/Referatas/sinewave.py index 8a4923b..761630d 100755 --- a/II/Referatas/sinewave.py +++ b/II/Referatas/sinewave.py @@ -6,7 +6,7 @@ import geopandas as gpd from shapely.geometry import LineString, MultiLineString INTERVAL = 0.1 -TAIL_LEN = 4 +TAIL_LEN = 10 SINE_LEN = 7 TAILS = np.zeros(int(TAIL_LEN / INTERVAL))