[postgis-users] st_union produces different result from st_memunion

Jonathan Schultz jonathan at schultz.la
Mon Jul 6 20:46:46 PDT 2020


Following my earlier question https://lists.osgeo.org/pipermail/postgis-users/2020-June/044253.html that didn't get any responses, I have isolated my problem down to a minimal case consisting of six LineStrings, where st_union produces an obviously incorrect result while st_memunion produces an apparently correct result.

What appears to happen is that st_union produces a result where the vertices have been snapped to a grid of distance approximately 1km.

The table dump is here: https://anonfiles.com/1fad81Edo2/bad_dump_minimal_2_minimal_sql To reproduce the problem all you need is a simply query:

> SELECT st_union(geometry)
>   FROM bad_dump_minimal_2_minimal

Can anyone suggest what might be happening or what I could do to investigate further?

Thanks,

Jonathan


More information about the postgis-users mailing list