[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0rc1-105-g24c1ede

git at osgeo.org git at osgeo.org
Mon Mar 1 13:55:04 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, master has been updated
       via  24c1edea5e8f56c415338afec6139f7f5bd6c121 (commit)
      from  29e1db13409b995d8e04cabf86d329f15d512645 (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 24c1edea5e8f56c415338afec6139f7f5bd6c121
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 ad44356..c4aff1a 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 6f22297..30b1d58 100644
--- a/regress/core/tickets_expected
+++ b/regress/core/tickets_expected
@@ -194,6 +194,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]
+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 |  1 +
 2 files changed, 25 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list