[postgis-tickets] [SCM] PostGIS branch stable-3.3 updated. 3.3.2-26-g6dd312695
git at osgeo.org
git at osgeo.org
Sat Feb 18 02:13:59 PST 2023
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.3 has been updated
via 6dd312695afb10ce117710c949c3cc0d6ba9c197 (commit)
from 6885b9dd4f7ecbd340dcbabfc067bc3e1d91a415 (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 6dd312695afb10ce117710c949c3cc0d6ba9c197
Author: Regina Obe <lr at pcorp.us>
Date: Sat Feb 18 03:18:24 2023 -0500
ST_AsLatLon infinite coordinate.
References #5342 for PostGIS 3.3.3
diff --git a/postgis/lwgeom_inout.c b/postgis/lwgeom_inout.c
index d5b076846..55f335893 100644
--- a/postgis/lwgeom_inout.c
+++ b/postgis/lwgeom_inout.c
@@ -236,6 +236,11 @@ Datum LWGEOM_to_latlon(PG_FUNCTION_ARGS)
PG_RETURN_NULL();
}
+ if (!lwgeom_isfinite(lwgeom)) {
+ lwpgerror("ST_AsLatLonText: invalid coordinate");
+ PG_RETURN_NULL();
+ }
+
format_str = text_to_cstring(format_text);
assert(format_str != NULL);
diff --git a/regress/core/out_geometry.sql b/regress/core/out_geometry.sql
index b8f41b913..e3c6ecc01 100644
--- a/regress/core/out_geometry.sql
+++ b/regress/core/out_geometry.sql
@@ -172,4 +172,7 @@ SELECT 'text_precision_02', ST_AsText(GeomFromEWKT('SRID=4326;POINT(111.1111111
--
SELECT 'EWKT_' || i, ST_AsEWKT('SRID=4326;POINT(12345678.123456789 1)'::geometry, i)
FROM generate_series(0, 20) AS t(i)
-ORDER BY i;
\ No newline at end of file
+ORDER BY i;
+
+-- infinite latlon https://trac.osgeo.org/postgis/ticket/5342
+SELECT '#5342' As ticket, ST_AsLatLonText('0101000020E6100000000000000000F07F000000000000F07F'::geometry);
diff --git a/regress/core/out_geometry_expected b/regress/core/out_geometry_expected
index 13f0c88bd..029439849 100644
--- a/regress/core/out_geometry_expected
+++ b/regress/core/out_geometry_expected
@@ -111,3 +111,4 @@ EWKT_17|SRID=4326;POINT(12345678.12345679 1)
EWKT_18|SRID=4326;POINT(12345678.12345679 1)
EWKT_19|SRID=4326;POINT(12345678.12345679 1)
EWKT_20|SRID=4326;POINT(12345678.12345679 1)
+ERROR: ST_AsLatLonText: invalid coordinate
-----------------------------------------------------------------------
Summary of changes:
postgis/lwgeom_inout.c | 5 +++++
regress/core/out_geometry.sql | 5 ++++-
regress/core/out_geometry_expected | 1 +
3 files changed, 10 insertions(+), 1 deletion(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list