concept tolerance in category postgis

appears as: tolerce, tolerce, tolerance
PostGIS in Action, Third Edition

This is an excerpt from Manning's book PostGIS in Action, Third Edition.

There are four variants of this function. The most common one takes one argument for tolerance and rounds the X and Y coordinates while leaving Z and M intact (ST_SnapToGrid doesn’t remove Z and M coordinates). Other variants can round all four coordinates or allow you to specify tolerance. For example, a tolerance of 50 means that only coordinates within 50 units of each other can be rounded to the same value.

Listing 6.13. Comparing ST_Simplify, ST_SimplifyPreserveTopology
SELECT
    pow(2,n) as tolerance,
    ST_AsText(ST_Simplify(geom, pow(2,n))) As simp1,
    ST_AsText(ST_SimplifyPreserveTopology(geom, pow(2,n))) As simp2
FROM
    (SELECT ST_GeomFromText(
        'POLYGON Z(
            (10 0 1,20 0 1,30 10 1,30 20 1,20 30 1,10 30 1,0 20 1,0 10 1,10 0 1)
        )') As geom) As x
    CROSS JOIN
    generate_series(1,4) As n;

ST_DWithin can also substitute for the ST_Intersects function. When used this way, you call the approach intersects with tolerance.