[postgis-tickets] r17917 - Reduce sensitivity of ST_OrientedEnvelope test

Raul raul at rmr.ninja
Mon Oct 14 04:18:00 PDT 2019


Author: algunenano
Date: 2019-10-14 04:17:59 -0700 (Mon, 14 Oct 2019)
New Revision: 17917

Modified:
   branches/2.5/regress/oriented_envelope.sql
Log:
Reduce sensitivity of ST_OrientedEnvelope test

GEOS 3.8 produces slightly different coordinate values

Backport from 3.0



Modified: branches/2.5/regress/oriented_envelope.sql
===================================================================
--- branches/2.5/regress/oriented_envelope.sql	2019-10-14 06:38:09 UTC (rev 17916)
+++ branches/2.5/regress/oriented_envelope.sql	2019-10-14 11:17:59 UTC (rev 17917)
@@ -8,5 +8,6 @@
 SELECT 't4', ST_Equals('LINESTRING (-1 -1, 2 2)', ST_OrientedEnvelope('MULTIPOINT ((0 0), (-1 -1), (2 2))'));
 SELECT 't5', ST_Equals('POINT (0.9625 2)', ST_OrientedEnvelope('POINT (0.9625 2)'));
 -- Also works for normal inputs
-SELECT 't6', ST_Equals('POLYGON ((3 2, 2.88 2.16, -1.12 -0.84, -1 -1, 3 2))', ST_OrientedEnvelope('MULTIPOINT ((0 0), (-1 -1), (3 2))'));
+-- Check using text to avoid precision difference between various GEOS versions
+SELECT 't6', ST_AsText(ST_OrientedEnvelope('MULTIPOINT ((0 0), (-1 -1), (3 2))')) = 'POLYGON((3 2,2.88 2.16,-1.12 -0.84,-1 -1,3 2))';
 



More information about the postgis-tickets mailing list