[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0rc1-148-g4f82417

git at osgeo.org git at osgeo.org
Tue Apr 20 14:12:45 PDT 2021


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  4f8241765fe8cf3d323cc68ba2642b225bde749b (commit)
      from  0a9809b7978b77e09f173ce256ec696a04071b30 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4f8241765fe8cf3d323cc68ba2642b225bde749b
Author: Martin Davis <mtnclimb at gmail.com>
Date:   Tue Apr 20 14:12:35 2021 -0700

    Add doc FAQ for overlay inconsistency

diff --git a/doc/faq.xml b/doc/faq.xml
index 5bc9bd9..1d4a065 100644
--- a/doc/faq.xml
+++ b/doc/faq.xml
@@ -403,6 +403,46 @@ WHERE ST_DWithin(geocolumn, 'POINT(1000 1000)', 100.0);</programlisting>
       </answer>
     </qandaentry>
 
+	<qandaentry id="overlay_inconsistent">
+      <question>
+        <para>Why are the results of overlay operations and spatial predicates sometimes inconsistent?</para>
+      </question>
+
+      <answer>
+        <para>This is usually presented as a specific case, such as
+            </para>
+        <itemizedlist>
+            <listitem>
+            <para>Why is <varname>ST_Contains( A, ST_Intersection(A, B) )</varname> false ?</para>
+            </listitem>
+            <listitem>
+            <para>Why is <varname>ST_Contains( ST_Union(A, B), A ) )</varname> false ?</para>
+            </listitem>
+            <listitem>
+            <para>Why is <varname>ST_Union( A, ST_Difference(A, B) )</varname> not equal to A ?</para>
+            </listitem>
+            <listitem>
+            <para>Why does <varname>ST_Difference(A, B)</varname> intersect the interior of <varname>B</varname> ?</para>
+            </listitem>
+        </itemizedlist>
+
+		<para>The reason is that PostGIS represents geometry and performs operations using finite-precision floating-point numbers.
+        This provides the illusion of computing using real numbers - but it's only an illusion.
+        Inevitably, small inaccuracies occur, which cause results of different operations to be slightly inconsistent.
+            </para>
+
+        <para>Furthermore, PostGIS operations contain error-prevention code which may peturb
+        input geometries by tiny amounts in order to prevent robustness errors from occuring.
+        These minor alterations also may produce computed results which are not fully consistent.
+            </para>
+
+        <para>The discrepancy between results should always be very small.
+        But queries should not rely on exact consistency when comparing overlay results.
+        Instead, consider using an area or distance-based tolerance in geometric comparisons.
+            </para>
+      </answer>
+    </qandaentry>
+
   </qandaset>
 
 </chapter>

-----------------------------------------------------------------------

Summary of changes:
 doc/faq.xml | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list