[postgis-tickets] [SCM] PostGIS branch stable-3.0 updated. 3.0.3-15-g0091177

git at osgeo.org git at osgeo.org
Mon Mar 1 13:40:37 PST 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, stable-3.0 has been updated
       via  0091177ea6801e75ce0ac0f7b1487e8ee711f95e (commit)
      from  9ef629f7d8c8c1b34a210d6f5ec8173cfb2af7b0 (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 0091177ea6801e75ce0ac0f7b1487e8ee711f95e
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Mon Mar 1 13:38:47 2021 -0800

    Address differing error messages from Proj 8 and <8. References #4860

diff --git a/regress/core/tickets.sql b/regress/core/tickets.sql
index ce2af9d..267adfd 100644
--- a/regress/core/tickets.sql
+++ b/regress/core/tickets.sql
@@ -591,7 +591,30 @@ select '#1578', st_within(p, mp), st_intersects(p, mp) FROM inp;
 
 -- #1580
 select '#1580.1', ST_Summary(ST_Transform('SRID=4326;POINT(0 0)'::geometry, 3395));
-select '#1580.2', ST_Transform('SRID=4326;POINT(180 95)'::geometry, 3395); -- fails
+
+do $$
+declare
+proj_version integer;       
+err_str text;
+begin
+
+    select ((regexp_matches(postgis_proj_version(), '(\d+)\.\d+'))[1])::integer into proj_version;
+    select ST_Transform('SRID=4326;POINT(180 95)'::geometry, 3395); -- fails
+
+exception 
+when others then 
+    err_str := SQLERRM;
+    if proj_version >= 8 and SQLERRM = 'transform: Invalid coordinate (2049)' then
+        raise notice '#1580.2: Caught a PROJ error';
+    elsif proj_version < 8 and SQLERRM = 'transform: latitude or longitude exceeded limits (-14)' then
+        raise notice '#1580.2: Caught a PROJ error';
+    else
+    	raise notice '#1580.2: Unexpected PROJ Result. Proj version = %. Error string: %', proj_version, err_str;
+    end if;
+    
+end; 
+$$ language 'plpgsql';
+
 select '#1580.3', ST_Summary(ST_Transform('SRID=4326;POINT(0 0)'::geometry, 3395));
 
 -- #1596 --
diff --git a/regress/core/tickets_expected b/regress/core/tickets_expected
index ec6c0e5..f3ff300 100644
--- a/regress/core/tickets_expected
+++ b/regress/core/tickets_expected
@@ -195,7 +195,7 @@ ERROR:  got NULL for SRID (500001)
 #1543|MULTILINESTRING((0 0,10 0,10 10,0 0),(0 0))|POLYGON((0 0,10 10,10 0,0 0))
 #1578|f|f
 #1580.1|Point[S]
-ERROR:  transform: latitude or longitude exceeded limits (-14)
+NOTICE:  #1580.2: Caught a PROJ error
 #1580.3|Point[S]
 #1596.1|public.road_pg.roads_geom SRID:3395 TYPE:POINT DIMS:2 
 ERROR:  invalid SRID: 330000 not found in spatial_ref_sys

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

Summary of changes:
 regress/core/tickets.sql      | 25 ++++++++++++++++++++++++-
 regress/core/tickets_expected |  2 +-
 2 files changed, 25 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list