diff --git a/IV/Makefile b/IV/Makefile index cfffea1..a28d80d 100644 --- a/IV/Makefile +++ b/IV/Makefile @@ -70,7 +70,7 @@ slides: $(SLIDES) mj-msc.pdf: mj-msc.tex version.inc.tex vars.inc.tex bib.bib \ $(LISTINGS) $(addsuffix .pdf,$(FIGURES)) $(addsuffix .pdf,$(RIVERS)) - latexmk -shell-escape -g -pdf $< + latexmk -shell-escape -pdf $< ############################ # Report's test dependencies diff --git a/IV/layer2img.py b/IV/layer2img.py index 5517d38..1a13800 100644 --- a/IV/layer2img.py +++ b/IV/layer2img.py @@ -63,7 +63,6 @@ def read_layer(select, width, maybe_quadrant): conn = psycopg2.connect(PSQL_CREDS) sql = "SELECT {way} as way1 FROM {select}".format(way=way, select=select) - print(sql) return geopandas.read_postgis(sql, con=conn, geom_col='way1') diff --git a/IV/mj-msc.tex b/IV/mj-msc.tex index 4656f20..d1fb73c 100644 --- a/IV/mj-msc.tex +++ b/IV/mj-msc.tex @@ -729,21 +729,23 @@ compactness index is calculated as follows: \item Construct a polygon by joining first and last vertices of the bend. - \item Calculate area of the polygon. + \item Calculate area of the polygon $A_p$. - \item Calculate perimeter $u$ of the polygon. The same value is the - circumference of the circle. + \item Calculate perimeter $P$ of the polygon. The same value is the + circumference of the circle: $C = P$. - \item Given circle's perimeter $u$, circle's area $A$ is: + \item Given circle's circumference $C$, circle's area $A_c$ is: \[ - A = \frac{u^2}{4\pi} + A_{c} = \frac{C^2}{4\pi} \] - \item Compactness index is $\nicefrac{P}{A}$: + \item Compactness index is $\frac{A_p}{A_c}$: \[ - cmp = \frac{P}{A} = \frac{P}{ \frac{u^2}{4\pi} } = \frac{4\pi P}{u^2} + cmp = \frac{A_p}{A_c} = + \frac{A_p}{ \frac{C^2}{4\pi} } = + \frac{4\pi A_p}{C^2} \] \end{enumerate} diff --git a/IV/wm.sql b/IV/wm.sql index cdb096d..e809f93 100644 --- a/IV/wm.sql +++ b/IV/wm.sql @@ -411,8 +411,8 @@ create function isolated_bends( dbgname text default null ) as $$ declare - -- if neighbor's curvatures are within, it's isolated - isolation_threshold constant real default 0.25; + -- if neighbor's curvatures are within this fraction of the current bend + isolation_threshold constant real default 0.5; this real; skip_next bool; res t_bend_attrs; @@ -438,6 +438,11 @@ begin i, res.bend, jsonb_build_object( + 'area', res.area, + 'cmp', res.cmp, + 'adjsize', res.adjsize, + 'baselinelength', res.baselinelength, + 'curvature', res.curvature, 'isolated', res.isolated ) );