[postgis-users] fuzzy tolerance
Willy-Bas Loos
willybas at gmail.com
Wed Sep 14 03:52:02 PDT 2016
On Wed, Sep 14, 2016 at 11:27 AM, Stefan Keller <sfkeller at gmail.com> wrote:
> There is at least SnapToGrid:
> # select ST_SnapToGrid((ST_DumpPoints(mypoly.geom)).geom, 0.1) from
> mypoly;
>
> :Stefan
>
Hm, i considered that before, but now i can't say why i discarded the
thought.
One thing is that the unit for snaptogrid is degrees for WGS84, so for
world data that would pose a problem: you're not using a uniform grid to
snap to.
But in other coordinate systems, and if the algorithm is fast enough, one
could use this in a trigger and always store geometries snapped to a 10cm
grid. That would be precise enough for our data.
It is easy to understand what is happening too, so that is an advantage.
BTW i tested and saw that it's not necessary to dump the points, you can
snap the whole polygon.
Any words of warning about using a trigger and storing the data on a 10 cm
grid like i suggest?
Cheers,
--
Willy-Bas Loos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20160914/23d26b43/attachment.html>
More information about the postgis-users
mailing list