fix wm_exaggerate
st_union drops M; use st_collect instead.
This commit is contained in:
parent
95e515b5cc
commit
701239087a
6
test.sql
6
test.sql
@ -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;
|
||||
|
3
wm.sql
3
wm.sql
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user