fix wm_exaggerate

st_union drops M; use st_collect instead.
This commit is contained in:
Motiejus Jakštys 2021-05-05 08:30:40 +03:00
parent cf67485d69
commit 2ca08d4f90
2 changed files with 5 additions and 4 deletions

View File

@ -21,7 +21,7 @@ create function dbg_geomsummary(geoms geometry[]) returns void as $$
begin
raise notice 'len: %', array_length(geoms, 1);
for i in 1..array_length(geoms, 1) loop
raise notice '%: %', lpad(i::text, 2, '0'), st_astext(geoms[i]);
raise notice '% %: %', st_geometrytype(geoms[i]), lpad(i::text, 2, '0'), st_astext(geoms[i]);
end loop;
end
$$ language plpgsql;
@ -198,6 +198,6 @@ declare
begin
select way from wm_debug where name='fig3' and stage='bbends' and gen=1 and nbend=2 into fig3b2;
size = wm_adjsize(fig3b2);
--bend = wm_exaggerate(fig3b2, size, 50.);
--insert into wm_debug(stage, name, gen, nbend, way) values('manual', 'fig3', 1, 1, bend);
bend = wm_exaggerate(fig3b2, size, 50.);
insert into wm_debug(stage, name, gen, nbend, way) values('manual', 'fig3', 1, 1, bend);
end $$ language plpgsql;

View File

@ -442,7 +442,7 @@ begin
-- Uses linear interpolation; can be updated to gaussian or similar;
-- then interpolate manually instead of relying on st_addmeasure.
bendm = st_union(
bendm = st_collect(
st_addmeasure(st_geometryn(splitbend, 1), 1, scale),
st_addmeasure(st_geometryn(splitbend, 2), scale, 1)
);
@ -456,6 +456,7 @@ begin
from st_dumppoints(bendm)
order by path[1], path[2]
));
bend = st_makeline(points);
size = wm_adjsize(bend);