rename all gdr data to grpk

This commit is contained in:
Motiejus Jakštys 2021-05-19 22:57:52 +03:00 committed by Motiejus Jakštys
parent 02bb942c4b
commit 164a20cf41
3 changed files with 63 additions and 63 deletions

View File

@ -34,7 +34,7 @@ RIVERS = \
salvis-25k \ salvis-25k \
salvis-50k \ salvis-50k \
salvis-250k-10x \ salvis-250k-10x \
salvis-gdr250-2x \ salvis-grpk250-2x \
salvis-dp-64-50k \ salvis-dp-64-50k \
salvis-vw-64-50k \ salvis-vw-64-50k \
salvis-dp-64-chaikin-50k \ salvis-dp-64-chaikin-50k \
@ -47,8 +47,8 @@ RIVERS = \
salvis-wm-50k-nw \ salvis-wm-50k-nw \
salvis-wm-50k-ne \ salvis-wm-50k-ne \
salvis-wm-overlaid-250k-zoom \ salvis-wm-overlaid-250k-zoom \
salvis-wm-gdr50 \ salvis-wm-grpk50 \
salvis-wm-gdr50-ne \ salvis-wm-grpk50-ne \
salvis-wm-220 salvis-wm-220
################################################################################ ################################################################################
@ -126,24 +126,24 @@ salvis-wm-250k-2x_WIDTHDIV = 2
salvis-wm-250k-10x_1SELECT = wm_visuals where name='salvis-wm-220' salvis-wm-250k-10x_1SELECT = wm_visuals where name='salvis-wm-220'
salvis-wm-250k-10x_WIDTHDIV = 10 salvis-wm-250k-10x_WIDTHDIV = 10
salvis-250k-10x_1SELECT = wm_visuals where name='salvis' salvis-250k-10x_1SELECT = wm_visuals where name='salvis-grpk10'
salvis-250k-10x_WIDTHDIV = 10 salvis-250k-10x_WIDTHDIV = 10
salvis-wm-overlaid-250k-zoom_1SELECT = wm_visuals where name='salvis-wm-220' salvis-wm-overlaid-250k-zoom_1SELECT = wm_visuals where name='salvis-wm-220'
salvis-wm-overlaid-250k-zoom_2SELECT = wm_visuals where name='salvis' salvis-wm-overlaid-250k-zoom_2SELECT = wm_visuals where name='salvis-grpk10'
salvis-wm-overlaid-250k-zoom_1COLOR = orange salvis-wm-overlaid-250k-zoom_1COLOR = orange
salvis-gdr250-2x_1SELECT = wm_visuals where name='salvis-gdr250' salvis-grpk250-2x_1SELECT = wm_visuals where name='salvis-grpk250'
salvis-gdr250-2x_WIDTHDIV = 2 salvis-grpk250-2x_WIDTHDIV = 2
################################################################################ ################################################################################
# 50K # 50K
################################################################################ ################################################################################
salvis-25k_1SELECT = wm_visuals where name='salvis' salvis-25k_1SELECT = wm_visuals where name='salvis-grpk10'
salvis-25k_WIDTHDIV = 1 salvis-25k_WIDTHDIV = 1
salvis-50k_1SELECT = wm_visuals where name='salvis' salvis-50k_1SELECT = wm_visuals where name='salvis-grpk10'
salvis-50k_WIDTHDIV = 2 salvis-50k_WIDTHDIV = 2
salvis-dp-64-50k_1SELECT = wm_visuals where name='salvis-dp-64' salvis-dp-64-50k_1SELECT = wm_visuals where name='salvis-dp-64'
@ -159,45 +159,45 @@ salvis-vw-64-chaikin-50k_2SELECT = wm_visuals where name='salvis-vw-chaikin-64'
salvis-vw-64-chaikin-50k_WIDTHDIV = 2 salvis-vw-64-chaikin-50k_WIDTHDIV = 2
salvis-overlaid-dp-64-chaikin-50k_1SELECT = wm_visuals where name='salvis-dp-chaikin-64' salvis-overlaid-dp-64-chaikin-50k_1SELECT = wm_visuals where name='salvis-dp-chaikin-64'
salvis-overlaid-dp-64-chaikin-50k_2SELECT = wm_visuals where name='salvis' salvis-overlaid-dp-64-chaikin-50k_2SELECT = wm_visuals where name='salvis-grpk10'
salvis-overlaid-dp-64-chaikin-50k_1COLOR = orange salvis-overlaid-dp-64-chaikin-50k_1COLOR = orange
salvis-overlaid-dp-64-chaikin-50k_WIDTHDIV = 2 salvis-overlaid-dp-64-chaikin-50k_WIDTHDIV = 2
salvis-overlaid-dp-64-chaikin-50k_QUADRANT = tl salvis-overlaid-dp-64-chaikin-50k_QUADRANT = tl
salvis-overlaid-vw-64-chaikin-50k_1SELECT = wm_visuals where name='salvis-vw-chaikin-64' salvis-overlaid-vw-64-chaikin-50k_1SELECT = wm_visuals where name='salvis-vw-chaikin-64'
salvis-overlaid-vw-64-chaikin-50k_2SELECT = wm_visuals where name='salvis' salvis-overlaid-vw-64-chaikin-50k_2SELECT = wm_visuals where name='salvis-grpk10'
salvis-overlaid-vw-64-chaikin-50k_1COLOR = orange salvis-overlaid-vw-64-chaikin-50k_1COLOR = orange
salvis-overlaid-vw-64-chaikin-50k_WIDTHDIV = 2 salvis-overlaid-vw-64-chaikin-50k_WIDTHDIV = 2
salvis-overlaid-vw-64-chaikin-50k_QUADRANT = tl salvis-overlaid-vw-64-chaikin-50k_QUADRANT = tl
salvis-wm-50k_1SELECT = wm_visuals where name='salvis-wm-75' salvis-wm-50k_1SELECT = wm_visuals where name='salvis-wm-75'
salvis-wm-50k_2SELECT = wm_visuals where name='salvis' salvis-wm-50k_2SELECT = wm_visuals where name='salvis-grpk10'
salvis-wm-50k_1COLOR = orange salvis-wm-50k_1COLOR = orange
salvis-wm-50k-nw_1SELECT = wm_visuals where name='salvis-wm-75' salvis-wm-50k-nw_1SELECT = wm_visuals where name='salvis-wm-75'
salvis-wm-50k-nw_2SELECT = wm_visuals where name='salvis' salvis-wm-50k-nw_2SELECT = wm_visuals where name='salvis-grpk10'
salvis-wm-50k-nw_1COLOR = orange salvis-wm-50k-nw_1COLOR = orange
salvis-wm-50k-nw_QUADRANT = tr salvis-wm-50k-nw_QUADRANT = tr
salvis-wm-50k-ne_1SELECT = wm_visuals where name='salvis-wm-75' salvis-wm-50k-ne_1SELECT = wm_visuals where name='salvis-wm-75'
salvis-wm-50k-ne_2SELECT = wm_visuals where name='salvis' salvis-wm-50k-ne_2SELECT = wm_visuals where name='salvis-grpk10'
salvis-wm-50k-ne_1COLOR = orange salvis-wm-50k-ne_1COLOR = orange
salvis-wm-50k-ne_QUADRANT = tl salvis-wm-50k-ne_QUADRANT = tl
salvis-wm-gdr50_1SELECT = wm_visuals where name='salvis-wm-75' salvis-wm-grpk50_1SELECT = wm_visuals where name='salvis-wm-75'
salvis-wm-gdr50_2SELECT = wm_visuals where name='salvis-gdr50' salvis-wm-grpk50_2SELECT = wm_visuals where name='salvis-grpk50'
salvis-wm-gdr50_3SELECT = wm_visuals where name='salvis' salvis-wm-grpk50_3SELECT = wm_visuals where name='salvis-grpk10'
salvis-wm-gdr50_1COLOR = orange salvis-wm-grpk50_1COLOR = orange
salvis-wm-gdr50_2COLOR = green salvis-wm-grpk50_2COLOR = green
salvis-wm-gdr50_3LINESTYLE = dotted salvis-wm-grpk50_3LINESTYLE = dotted
salvis-wm-gdr50-ne_1SELECT = wm_visuals where name='salvis-wm-75' salvis-wm-grpk50-ne_1SELECT = wm_visuals where name='salvis-wm-75'
salvis-wm-gdr50-ne_2SELECT = wm_visuals where name='salvis-gdr50' salvis-wm-grpk50-ne_2SELECT = wm_visuals where name='salvis-grpk50'
salvis-wm-gdr50-ne_3SELECT = wm_visuals where name='salvis' salvis-wm-grpk50-ne_3SELECT = wm_visuals where name='salvis-grpk10'
salvis-wm-gdr50-ne_1COLOR = orange salvis-wm-grpk50-ne_1COLOR = orange
salvis-wm-gdr50-ne_2COLOR = green salvis-wm-grpk50-ne_2COLOR = green
salvis-wm-gdr50-ne_3LINESTYLE = dotted salvis-wm-grpk50-ne_3LINESTYLE = dotted
salvis-wm-gdr50-ne_QUADRANT = tl salvis-wm-grpk50-ne_QUADRANT = tl
salvis-wm-220_1SELECT = wm_visuals where name='salvis-wm-220' salvis-wm-220_1SELECT = wm_visuals where name='salvis-wm-220'
salvis-wm-220_WIDTHDIV = 2 salvis-wm-220_WIDTHDIV = 2
@ -215,20 +215,20 @@ define wm_vwdp50k
RIVERS += salvis-$(1)-$(2)-50k$(3) RIVERS += salvis-$(1)-$(2)-50k$(3)
salvis-$(1)-$(2)-50k$(3)_1SELECT = wm_visuals where name='salvis-$(1)' salvis-$(1)-$(2)-50k$(3)_1SELECT = wm_visuals where name='salvis-$(1)'
salvis-$(1)-$(2)-50k$(3)_2SELECT = wm_visuals where name='salvis-$(2)' salvis-$(1)-$(2)-50k$(3)_2SELECT = wm_visuals where name='salvis-$(2)'
salvis-$(1)-$(2)-50k$(3)_3SELECT = wm_visuals where name='salvis' salvis-$(1)-$(2)-50k$(3)_3SELECT = wm_visuals where name='salvis-grpk10'
salvis-$(1)-$(2)-50k$(3)_1COLOR = green salvis-$(1)-$(2)-50k$(3)_1COLOR = orange
salvis-$(1)-$(2)-50k$(3)_1LABEL = $(label_$(1)) salvis-$(1)-$(2)-50k$(3)_1LABEL = $(label_$(2))
salvis-$(1)-$(2)-50k$(3)_2COLOR = orange salvis-$(1)-$(2)-50k$(3)_2COLOR = green
salvis-$(1)-$(2)-50k$(3)_2LABEL = $(label_$(2)) salvis-$(1)-$(2)-50k$(3)_2LABEL = $(label_$(1))
salvis-$(1)-$(2)-50k$(3)_3LINESTYLE = dotted salvis-$(1)-$(2)-50k$(3)_3LINESTYLE = dotted
salvis-$(1)-$(2)-50k$(3)_3LABEL = GRPK 1:\numprint{10000} salvis-$(1)-$(2)-50k$(3)_3LABEL = GRPK 1:\numprint{10000}
salvis-$(1)-$(2)-50k$(3)_QUADRANT = $(3) salvis-$(1)-$(2)-50k$(3)_QUADRANT = $(3)
salvis-$(1)-$(2)-50k$(3)_LEGEND = $(legend_$(3)) salvis-$(1)-$(2)-50k$(3)_LEGEND = $(legend_$(3))
endef endef
$(foreach x,vw-64 dp-64 vw-chaikin-64 dp-chaikin-64,\ $(foreach x,vw-64 dp-64 vw-chaikin-64 dp-chaikin-64,\
$(eval $(call wm_vwdp50k,$(x),wm-75,)) \ $(eval $(call wm_vwdp50k,wm-75,$(x),)) \
$(eval $(call wm_vwdp50k,$(x),wm-75,tl)) \ $(eval $(call wm_vwdp50k,wm-75,$(x),tl)) \
$(eval $(call wm_vwdp50k,$(x),wm-75,tr)) \ $(eval $(call wm_vwdp50k,wm-75,$(x),tr)) \
) )
define FIG_template define FIG_template
@ -401,5 +401,5 @@ refresh-$(1): aggregate-rivers.sql gdr2pgsql .faux_db_pre
endef endef
$(eval $(call rivers_template,rivers-10.sql,GDB10LT,wm_rivers)) $(eval $(call rivers_template,rivers-10.sql,GDB10LT,wm_rivers))
$(eval $(call rivers_template,rivers-50.sql,GDR50LT,wm_rivers_50)) $(eval $(call rivers_template,rivers-50.sql,grpk50LT,wm_rivers_50))
$(eval $(call rivers_template,rivers-250.sql,GDR250LT,wm_rivers_250)) $(eval $(call rivers_template,rivers-250.sql,grpk250LT,wm_rivers_250))

View File

@ -1487,8 +1487,8 @@ future research and improvement:
\subsubsection{Background} \subsubsection{Background}
There are a few datasets used in this comparison: GDB10LT, GDR50LT and There are a few datasets used in this comparison: GDB10LT, grpk50LT and
GDR250LT. They are vector datasets, which include rivers. They can be grpk250LT. They are vector datasets, which include rivers. They can be
downloaded for free from \cite{nzt}. Here are the meanings of the codenames: downloaded for free from \cite{nzt}. Here are the meanings of the codenames:
\begin{description} \begin{description}
@ -1496,9 +1496,9 @@ downloaded for free from \cite{nzt}. Here are the meanings of the codenames:
\item[GDB10LT] is dataset of highest detail. Suited for maps of scale \item[GDB10LT] is dataset of highest detail. Suited for maps of scale
1:\numprint{10000}. 1:\numprint{10000}.
\item[GDR50LT] is suited for maps of scale 1:\numprint{50000}. \item[grpk50LT] is suited for maps of scale 1:\numprint{50000}.
\item[GDR250LT] offers least detail, and is suited for maps of \item[grpk250LT] offers least detail, and is suited for maps of
scale 1:\numprint{250000}. scale 1:\numprint{250000}.
\end{description} \end{description}
@ -1506,41 +1506,41 @@ downloaded for free from \cite{nzt}. Here are the meanings of the codenames:
During the analysis, we ran {\WM} on GDB10LT for 2 destination scales: During the analysis, we ran {\WM} on GDB10LT for 2 destination scales:
1:\numprint{50000} and 1:\numprint{250000}.\footnote{parameter calculation is 1:\numprint{50000} and 1:\numprint{250000}.\footnote{parameter calculation is
detailed in section~\ref{sec:bend-scaling-and-dimensions}.} This section detailed in section~\ref{sec:bend-scaling-and-dimensions}.} This section
compares the resulting {\WM}--generalized rivers to GDR50LT and GDR250LT. compares the resulting {\WM}--generalized rivers to grpk50LT and grpk250LT.
\subsubsection{Medium-scale (1:\numprint{50000})} \subsubsection{Medium-scale (1:\numprint{50000})}
For our research location, the national dataset GDB10LT is almost equivalent to For our research location, the national dataset GDB10LT is almost equivalent to
GDR50LT, with a few nuances. Figure~\ref{fig:salvis-wm-gdr50} illustrates grpk50LT, with a few nuances. Figure~\ref{fig:salvis-wm-grpk50} illustrates
all three shapes: GDR50LT, {\WM}--simplified GDB10LT, and the original GDB10LT. all three shapes: grpk50LT, {\WM}--simplified GDB10LT, and the original GDB10LT.
\begin{figure}[h!] \begin{figure}[h!]
\centering \centering
\includegraphics[width=\textwidth]{salvis-wm-gdr50} \includegraphics[width=\textwidth]{salvis-wm-grpk50}
\caption{2x zoomed-in GDR50LT (green), {\WM}--simplified GDB10LT (orange) \caption{2x zoomed-in grpk50LT (green), {\WM}--simplified GDB10LT (orange)
and original GDB10LT (dotted black).} and original GDB10LT (dotted black).}
\label{fig:salvis-wm-gdr50} \label{fig:salvis-wm-grpk50}
\end{figure} \end{figure}
\begin{figure}[h!] \begin{figure}[h!]
\centering \centering
\includegraphics[width=\textwidth]{salvis-wm-gdr50-ne} \includegraphics[width=\textwidth]{salvis-wm-grpk50-ne}
\caption{Top--right side of Figure~\ref{fig:salvis-wm-gdr50}.} \caption{Top--right side of Figure~\ref{fig:salvis-wm-grpk50}.}
\label{fig:salvis-wm-gdr50-ne} \label{fig:salvis-wm-grpk50-ne}
\end{figure} \end{figure}
Although figures are almost identical, Figure~\ref{fig:salvis-wm-gdr50-ne} Although figures are almost identical, Figure~\ref{fig:salvis-wm-grpk50-ne}
illustrates two small bends that have been removed in GDR50LT, but have been illustrates two small bends that have been removed in grpk50LT, but have been
exaggerated by our implementation. exaggerated by our implementation.
\subsubsection{Large-scale (1:\numprint{250000})} \subsubsection{Large-scale (1:\numprint{250000})}
\label{sec:national-large-scale} \label{sec:national-large-scale}
Figure~\ref{fig:salvis-wm-250k} illustrates the original GDR250LT and the Figure~\ref{fig:salvis-wm-250k} illustrates the original grpk250LT and the
{\WM}--simplified version. As section~\ref{sec:analyzed-large-scale} explains, {\WM}--simplified version. As section~\ref{sec:analyzed-large-scale} explains,
the algorithm tries to exaggerate many bends to a great size. However, GDR250LT the algorithm tries to exaggerate many bends to a great size. However, grpk250LT
takes the opposite approach --- only the very basic shapes of the largest bends takes the opposite approach --- only the very basic shapes of the largest bends
are retained. Time and customers will tell, which approach is more appropriate, are retained. Time and customers will tell, which approach is more appropriate,
after the current {\WM} implementation receives some time and attention, as after the current {\WM} implementation receives some time and attention, as
@ -1549,8 +1549,8 @@ desired in section~\ref{sec:future-suggestions}.
\begin{figure}[h!] \begin{figure}[h!]
\centering \centering
\begin{subfigure}[b]{.49\textwidth} \begin{subfigure}[b]{.49\textwidth}
\includegraphics[width=\textwidth]{salvis-gdr250-2x} \includegraphics[width=\textwidth]{salvis-grpk250-2x}
\caption{GDR250LT.} \caption{grpk250LT.}
\end{subfigure} \end{subfigure}
\hfill \hfill
\begin{subfigure}[b]{.49\textwidth} \begin{subfigure}[b]{.49\textwidth}
@ -1558,7 +1558,7 @@ desired in section~\ref{sec:future-suggestions}.
\includegraphics[width=\textwidth]{salvis-wm-220} \includegraphics[width=\textwidth]{salvis-wm-220}
\caption{{\WM}-simplified GDB10LT.} \caption{{\WM}-simplified GDB10LT.}
\end{subfigure} \end{subfigure}
\caption{GDR250LT and {\WM}--simplified GDB10LT.} \caption{grpk250LT and {\WM}--simplified GDB10LT.}
\label{fig:salvis-wm-250k} \label{fig:salvis-wm-250k}
\end{figure} \end{figure}

View File

@ -99,19 +99,19 @@ end $$ language plpgsql;
delete from wm_debug where name like 'salvis%'; delete from wm_debug where name like 'salvis%';
delete from wm_visuals where name like 'salvis%'; delete from wm_visuals where name like 'salvis%';
insert into wm_visuals(name, way) values insert into wm_visuals(name, way) values
('salvis', ( ('salvis-grpk10', (
wm_salvisbbox( wm_salvisbbox(
(select st_union(way) from wm_rivers where name in ('Šalčia', 'Visinčia')), (select st_union(way) from wm_rivers where name in ('Šalčia', 'Visinčia')),
:scaledwidth :scaledwidth
) )
)), )),
('salvis-gdr50', ( ('salvis-grpk50', (
wm_salvisbbox( wm_salvisbbox(
(select st_union(way) from wm_rivers_50 where name in ('Šalčia', 'Visinčia')), (select st_union(way) from wm_rivers_50 where name in ('Šalčia', 'Visinčia')),
:scaledwidth :scaledwidth
) )
)), )),
('salvis-gdr250', ( ('salvis-grpk250', (
wm_salvisbbox( wm_salvisbbox(
(select st_union(way) from wm_rivers_250 where name in ('Šalčia', 'Visinčia')), (select st_union(way) from wm_rivers_250 where name in ('Šalčia', 'Visinčia')),
:scaledwidth :scaledwidth
@ -126,8 +126,8 @@ declare
geom3 geometry; geom3 geometry;
begin begin
foreach i in array array[16, 32, 64, 256] loop foreach i in array array[16, 32, 64, 256] loop
geom1 = st_simplify((select way from wm_visuals where name='salvis'), i); geom1 = st_simplify((select way from wm_visuals where name='salvis-grpk10'), i);
geom2 = st_simplifyvw((select way from wm_visuals where name='salvis'), i*i); geom2 = st_simplifyvw((select way from wm_visuals where name='salvis-grpk10'), i*i);
insert into wm_visuals(name, way) values insert into wm_visuals(name, way) values
('salvis-dp-' || i, geom1), ('salvis-dp-' || i, geom1),
('salvis-dp-chaikin-' || i, st_chaikinsmoothing(geom1, 5)), ('salvis-dp-chaikin-' || i, st_chaikinsmoothing(geom1, 5)),
@ -139,7 +139,7 @@ begin
-- Šalčia-Visinčia crossing, and it "exaggerates" to the -- Šalčia-Visinčia crossing, and it "exaggerates" to the
-- other river. -- other river.
foreach i in array array[75, 220] loop foreach i in array array[75, 220] loop
geom3 = st_simplifywm((select way from wm_visuals where name='salvis'), i, 50, 'salvis-wm-' || i); geom3 = st_simplifywm((select way from wm_visuals where name='salvis-grpk10'), i, 50, 'salvis-wm-' || i);
insert into wm_visuals(name, way) values insert into wm_visuals(name, way) values
('salvis-wm-' || i, geom3); ('salvis-wm-' || i, geom3);
end loop; end loop;