[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0rc2-972-g8587a621d

git at osgeo.org git at osgeo.org
Thu Jun 15 14:51:33 PDT 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, master has been updated
       via  8587a621dbc928841e2ba4f932b3f3acf272a6e9 (commit)
      from  123a3dc7532c3fcc94f399153f0618ab1027fa5a (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 8587a621dbc928841e2ba4f932b3f3acf272a6e9
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Thu Jun 15 14:51:03 2023 -0700

    Change test to harmonize GEOGCS entries and hopefully
    avoid exercising the Proj gridshift system.
    References #5316

diff --git a/regress/core/regress_proj_4890.sql b/regress/core/regress_proj_4890.sql
index 297c1ef3b..4f9528c42 100644
--- a/regress/core/regress_proj_4890.sql
+++ b/regress/core/regress_proj_4890.sql
@@ -1,12 +1,43 @@
-CREATE TABLE points AS SELECT * FROM (VALUES ('SRID=4326;POINT(-124.9921 49.6851)'::geometry), ('SRID=4326;POINT(-119.4032 50.0305)'::geometry), ('SRID=4326;POINT(-122.799 49.1671)'::geometry), ('SRID=4326;POINT(-122.3379 49.0597)'::geometry), ('SRID=4326;POINT(-123.1264 49.2671)'::geometry), ('SRID=4326;POINT(-122.7132 49.0519)'::geometry), ('SRID=4326;POINT(-124.3475 49.3042)'::geometry), ('SRID=4326;POINT(-119.389 49.8891)'::geometry), ('SRID=4326;POINT(-123.126 49.281)'::geometry), ('SRID=4326;POINT(-122.6606 49.1134)'::geometry), ('SRID=4326;POINT(-124.3233 49.312)'::geometry), ('SRID=4326;POINT(-124.0478 49.2397)'::geometry), ('SRID=4326;POINT(-119.2683 50.266)'::geometry), ('SRID=4326;POINT(-121.9705 49.081)'::geometry), ('SRID=4326;POINT(-123.8854 49.482)'::geometry), ('SRID=4326;POINT(-123.1528 49.77)'::geometry), ('SRID=4326;POINT(-120.8051 50.488)'::geometry), ('SRID=4326;POINT(-122.6403 49.1652)'::geometry), ('SRID=4326;POINT(-122.7717 49.2433)'::geometry), ('SRID=4326;P
 OINT(-121.9587 49.1661)'::geometry))
-p(g);
+CREATE TABLE points AS
+	SELECT * FROM (
+		VALUES
+			('SRID=4269;POINT(-124.9921 49.6851)'::geometry),
+			('SRID=4269;POINT(-119.4032 50.0305)'::geometry),
+			('SRID=4269;POINT(-122.799 49.1671)'::geometry),
+			('SRID=4269;POINT(-122.3379 49.0597)'::geometry),
+			('SRID=4269;POINT(-123.1264 49.2671)'::geometry),
+			('SRID=4269;POINT(-122.7132 49.0519)'::geometry),
+			('SRID=4269;POINT(-124.3475 49.3042)'::geometry),
+			('SRID=4269;POINT(-119.389 49.8891)'::geometry),
+			('SRID=4269;POINT(-123.126 49.281)'::geometry),
+			('SRID=4269;POINT(-122.6606 49.1134)'::geometry),
+			('SRID=4269;POINT(-124.3233 49.312)'::geometry),
+			('SRID=4269;POINT(-124.0478 49.2397)'::geometry),
+			('SRID=4269;POINT(-119.2683 50.266)'::geometry),
+			('SRID=4269;POINT(-121.9705 49.081)'::geometry),
+			('SRID=4269;POINT(-123.8854 49.482)'::geometry),
+			('SRID=4269;POINT(-123.1528 49.77)'::geometry),
+			('SRID=4269;POINT(-120.8051 50.488)'::geometry),
+			('SRID=4269;POINT(-122.6403 49.1652)'::geometry),
+			('SRID=4269;POINT(-122.7717 49.2433)'::geometry),
+			('SRID=4269;POINT(-121.9587 49.1661)'::geometry)
+		) p(g);
 
-CREATE OR REPLACE FUNCTION get_closest(p geometry(POINT)) RETURNS geometry(POINT) AS $$
-    SELECT g FROM points ORDER BY st_transform(p, 3005) <-> st_transform(points.g, 3005) LIMIT 1
-$$
-STABLE
-LANGUAGE SQL;
+CREATE OR REPLACE FUNCTION get_closest(p geometry(POINT))
+	RETURNS geometry(POINT)
+	AS
+	$$
+		SELECT g
+		FROM points
+		ORDER BY st_transform(p, 3005) <-> st_transform(points.g, 3005)
+		LIMIT 1
+	$$
+	STABLE
+	LANGUAGE SQL;
+
+SELECT 4890 AS id,
+			 ST_AsText(ST_SnapToGrid(ST_Centroid(ST_Collect(get_closest(g) )), 0.0001))
+	FROM points;
 
-SELECT 4890 AS id, ST_AsText(ST_SnapToGrid(ST_Centroid(ST_Collect(get_closest(g) )), 0.0001)) FROM points ;
 DROP TABLE points;
 DROP FUNCTION get_closest(geometry);

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

Summary of changes:
 regress/core/regress_proj_4890.sql | 47 +++++++++++++++++++++++++++++++-------
 1 file changed, 39 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list