generate WM visuals
This commit is contained in:
parent
6d77c5e334
commit
be5a175b6b
@ -58,6 +58,9 @@ mj-msc-full.pdf: mj-msc.pdf version.inc.tex $(ARCHIVABLES) ## Thesis for publish
|
|||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: .faux_test ## Unit tests (fast)
|
test: .faux_test ## Unit tests (fast)
|
||||||
|
|
||||||
|
.PHONY: visuals
|
||||||
|
visuals: .faux_visuals # Generate visuals for paper (fast)
|
||||||
|
|
||||||
.PHONY: test-rivers
|
.PHONY: test-rivers
|
||||||
test-rivers: .faux_test-rivers ## Rivers tests (slow)
|
test-rivers: .faux_test-rivers ## Rivers tests (slow)
|
||||||
|
|
||||||
|
@ -85,16 +85,17 @@ declare
|
|||||||
i integer;
|
i integer;
|
||||||
geom1 geometry;
|
geom1 geometry;
|
||||||
geom2 geometry;
|
geom2 geometry;
|
||||||
|
geom3 geometry;
|
||||||
begin
|
begin
|
||||||
foreach i in array array[16, 64, 256] loop
|
foreach i in array array[16, 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'), 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'), i*i);
|
||||||
|
geom3 = st_simplifywm((select way from wm_visuals where name='salvis'), i);
|
||||||
insert into wm_visuals(name, way) values
|
insert into wm_visuals(name, way) values
|
||||||
('salvis-douglas-' || i, geom1),
|
('salvis-douglas-' || i, geom1),
|
||||||
('salvis-douglas-' || i || '-chaikin', st_chaikinsmoothing(geom1, 5)),
|
('salvis-douglas-' || i || '-chaikin', st_chaikinsmoothing(geom1, 5)),
|
||||||
('salvis-visvalingam-' || i, geom2),
|
('salvis-visvalingam-' || i, geom2),
|
||||||
('salvis-visvalingam-' || i || '-chaikin', st_chaikinsmoothing(geom2, 5));
|
('salvis-visvalingam-' || i || '-chaikin', st_chaikinsmoothing(geom2, 5)),
|
||||||
|
('salvis-wm-' || i, geom3);
|
||||||
end loop;
|
end loop;
|
||||||
end $$ language plpgsql;
|
end $$ language plpgsql;
|
||||||
|
|
||||||
insert into wm_demo (name, way) select name, ST_SimplifyWM(way, 75, null, name) from wm_visuals where name='salvis';
|
|
||||||
|
Loading…
Reference in New Issue
Block a user