formatting

main
Motiejus Jakštys 2021-05-19 22:57:47 +03:00 committed by Motiejus Jakštys
parent d6976199cf
commit 80de8f7950
2 changed files with 24 additions and 4 deletions

View File

@ -227,6 +227,8 @@ This section defines vocabulary and terms as defined in the rest of the paper.
geometric definition is complex and is discussed in
section~\onpage{sec:definition-of-a-bend}.
\item[Baseline] is a line between bend's first and last vertex.
\end{description}
\subsection{Radians and Degrees}
@ -406,6 +408,9 @@ The "quite small angle" was arbitrarily chosen to $\smallAngle$.
\subsection{Self-line Crossing When Cutting a Bend}
When bend's baseline crosses another bend, it is called self-crossing. This is
undesirable in the upcoming operators, and self-crossings should be removed.
\subsection{Attributes of a Single Bend}
\subsection{Shape of a Bend}
@ -434,6 +439,8 @@ The "quite small angle" was arbitrarily chosen to $\smallAngle$.
\section{Code listings}
\subsection{Reproducing the generalizations in this paper}
We strongly believe in the ability to reproduce the results is critical for any
scientific work. To make it possible for this paper, all source files and
accompanying scripts have been attached to the PDF. To re-generate this
@ -444,5 +451,8 @@ We strongly believe in the ability to reproduce the results is critical for any
This was tested on Linux Debian 11 with upstream packages only.
%\subsection{Algorithm code listings}
%\inputminted[fontsize=\small]{plpgsql}{wm.sql}
\end{appendices}
\end{document}

18
wm.sql
View File

@ -320,7 +320,10 @@ create type t_bend_attrs as (
curvature real,
isolated boolean
);
create function bend_attrs(bends geometry[], dbgname text default null) returns setof t_bend_attrs as $$
create function bend_attrs(
bends geometry[],
dbgname text default null
) returns setof t_bend_attrs as $$
declare
fourpi constant real default 4*radians(180);
i int4;
@ -375,9 +378,13 @@ begin
end;
$$ language plpgsql;
create function isolated_bends(INOUT bendattrs t_bend_attrs[], dbgname text default null) as $$
create function isolated_bends(
INOUT bendattrs t_bend_attrs[],
dbgname text default null
) as $$
declare
isolation_threshold constant real default 0.25; -- if neighbor's curvatures are within, it's isolated
-- if neighbor's curvatures are within, it's isolated
isolation_threshold constant real default 0.25;
this real;
skip_next bool;
res t_bend_attrs;
@ -416,7 +423,10 @@ $$ language plpgsql;
-- "Line Generalization Based on Analysis of Shape Characteristics" algorithm,
-- 1998.
drop function if exists ST_SimplifyWM;
create function ST_SimplifyWM(geom geometry, dbgname text default null) returns geometry as $$
create function ST_SimplifyWM(
geom geometry,
dbgname text default null
) returns geometry as $$
declare
stagenum integer;
i integer;