bring back non-debug mode
This commit is contained in:
parent
76dee76b31
commit
b0d4158481
10
IV/Makefile
10
IV/Makefile
@ -41,7 +41,7 @@ RIVERS = \
|
|||||||
salvis-overlaid-douglas-64-chaikin-50k \
|
salvis-overlaid-douglas-64-chaikin-50k \
|
||||||
salvis-overlaid-visvalingam-64-chaikin-50k \
|
salvis-overlaid-visvalingam-64-chaikin-50k \
|
||||||
salvis-wm-75-50k \
|
salvis-wm-75-50k \
|
||||||
salvis-wm-375-250k
|
salvis-wm-220-250k
|
||||||
|
|
||||||
#################################
|
#################################
|
||||||
# The thesis, publishable version
|
# The thesis, publishable version
|
||||||
@ -198,10 +198,10 @@ salvis-wm-75-50k_2SELECT = wm_visuals where name='salvis-wm-75'
|
|||||||
salvis-wm-75-50k_1COLOR = orange
|
salvis-wm-75-50k_1COLOR = orange
|
||||||
salvis-wm-75-50k_WIDTHDIV = 2
|
salvis-wm-75-50k_WIDTHDIV = 2
|
||||||
|
|
||||||
salvis-wm-375-250k_1SELECT = wm_visuals where name='salvis'
|
salvis-wm-220-250k_1SELECT = wm_visuals where name='salvis'
|
||||||
salvis-wm-375-250k_2SELECT = wm_visuals where name='salvis-wm-375'
|
salvis-wm-220-250k_2SELECT = wm_visuals where name='salvis-wm-220'
|
||||||
salvis-wm-375-250k_1COLOR = orange
|
salvis-wm-220-250k_1COLOR = orange
|
||||||
salvis-wm-375-250k_WIDTHDIV = 2
|
salvis-wm-220-250k_WIDTHDIV = 2
|
||||||
|
|
||||||
.faux_db: db init.sql rivers.sql
|
.faux_db: db init.sql rivers.sql
|
||||||
bash db start
|
bash db start
|
||||||
|
@ -125,7 +125,12 @@ begin
|
|||||||
('salvis-visvalingam-' || i, geom2),
|
('salvis-visvalingam-' || i, geom2),
|
||||||
('salvis-visvalingam-' || i || '-chaikin', st_chaikinsmoothing(geom2, 5));
|
('salvis-visvalingam-' || i || '-chaikin', st_chaikinsmoothing(geom2, 5));
|
||||||
end loop;
|
end loop;
|
||||||
foreach i in array array[75, 375] loop
|
-- 220 doesn't work, because there is an exaggerated bend
|
||||||
|
-- near Šalčia-Žeimena crossing, and it "exaggerates" to the
|
||||||
|
-- other river.
|
||||||
|
-- cross-river crossing detection should be more robust --- and
|
||||||
|
-- the current problems are described in the paper.
|
||||||
|
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'), 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);
|
||||||
|
16
IV/wm.sql
16
IV/wm.sql
@ -585,7 +585,6 @@ begin
|
|||||||
st_pointn(bends[i], st_npoints(bends[i])-1),
|
st_pointn(bends[i], st_npoints(bends[i])-1),
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
if dbgname is not null then
|
if dbgname is not null then
|
||||||
insert into wm_debug (stage, name, gen, nbend, way) values(
|
insert into wm_debug (stage, name, gen, nbend, way) values(
|
||||||
'gexaggeration', dbgname, dbggen, i, bends[i]);
|
'gexaggeration', dbgname, dbggen, i, bends[i]);
|
||||||
@ -736,6 +735,7 @@ begin
|
|||||||
gen = 1;
|
gen = 1;
|
||||||
|
|
||||||
while mutated loop
|
while mutated loop
|
||||||
|
|
||||||
if dbgname is not null then
|
if dbgname is not null then
|
||||||
insert into wm_debug (stage, name, gen, nbend, way) values(
|
insert into wm_debug (stage, name, gen, nbend, way) values(
|
||||||
'afigures', dbgname, gen, i, lines[i]);
|
'afigures', dbgname, gen, i, lines[i]);
|
||||||
@ -745,7 +745,6 @@ begin
|
|||||||
bends = wm_fix_gentle_inflections(bends, dbgname, gen);
|
bends = wm_fix_gentle_inflections(bends, dbgname, gen);
|
||||||
|
|
||||||
select * from wm_self_crossing(bends, dbgname, gen) into bends, mutated;
|
select * from wm_self_crossing(bends, dbgname, gen) into bends, mutated;
|
||||||
|
|
||||||
if not mutated then
|
if not mutated then
|
||||||
attrs = wm_bend_attrs(bends, dbgname, gen);
|
attrs = wm_bend_attrs(bends, dbgname, gen);
|
||||||
|
|
||||||
@ -765,16 +764,15 @@ begin
|
|||||||
|
|
||||||
if st_geometrytype(lines[i]) != 'ST_LineString' then
|
if st_geometrytype(lines[i]) != 'ST_LineString' then
|
||||||
-- For manual debugging:
|
-- For manual debugging:
|
||||||
insert into wm_manual(name, way)
|
--insert into wm_manual(name, way)
|
||||||
select 'non-linestring-' || a.path[1], a.geom
|
--select 'non-linestring-' || a.path[1], a.geom
|
||||||
from st_dump(lines[i]) a
|
--from st_dump(lines[i]) a
|
||||||
order by a.path[1];
|
--order by a.path[1];
|
||||||
raise notice '[%] Got % (in %) instead of ST_LineString. '
|
raise '[%] Got % (in %) instead of ST_LineString. '
|
||||||
'Does the exaggerated bend intersect with the line? '
|
'Does the exaggerated bend intersect with the line? '
|
||||||
'If so, try increasing intersect_patience.',
|
'If so, try increasing intersect_patience.',
|
||||||
gen, st_geometrytype(lines[i]), dbgname;
|
gen, st_geometrytype(lines[i]), dbgname;
|
||||||
raise notice 'exiting lineloop, gen:%', gen;
|
--exit lineloop;
|
||||||
exit lineloop;
|
|
||||||
end if;
|
end if;
|
||||||
gen = gen + 1;
|
gen = gen + 1;
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user