[postgis-tickets] [SCM] PostGIS branch stable-3.2 updated. 3.2.0-7-ge65292b7b
git at osgeo.org
git at osgeo.org
Wed Dec 22 10:26:07 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.2 has been updated
via e65292b7b9384ae4039a2920fdde7e5a07baf70b (commit)
via 89949433f40e6586c8fa2568f8d26ccba268fd16 (commit)
via 034dae8055786d7d968930bde9afacc3e383a209 (commit)
from 7020472ed0a763fa22ac2309a151f92b79d9a436 (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 e65292b7b9384ae4039a2920fdde7e5a07baf70b
Author: Sandro Santilli <strk at kbt.io>
Date: Sun Dec 19 23:29:53 2021 +0100
Update docs about ST_AsKML
diff --git a/doc/reference_output.xml b/doc/reference_output.xml
index f58c3d37b..1c55f2bb7 100644
--- a/doc/reference_output.xml
+++ b/doc/reference_output.xml
@@ -979,7 +979,7 @@ SELECT ST_AsGML(3, ST_GeomFromEWKT('POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0
<refnamediv>
<refname>ST_AsKML</refname>
- <refpurpose>Return the geometry as a KML element. Several variants. Default version=2, default maxdecimaldigits=15</refpurpose>
+ <refpurpose>Return the geometry as a KML element.</refpurpose>
</refnamediv>
<refsynopsisdiv>
@@ -1005,9 +1005,9 @@ SELECT ST_AsGML(3, ST_GeomFromEWKT('POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0
<refsection>
<title>Description</title>
- <para>Return the geometry as a Keyhole Markup Language (KML) element. There are several variants of this function.
- maximum number of decimal places used in
- output (defaults to 15), version default to 2 and default namespace is no prefix.</para>
+ <para>Return the geometry as a Keyhole Markup Language (KML) element.
+ default maximum number of decimal places is 15,
+ default namespace is no prefix.</para>
<warning>
<para>Using the <parameter>maxdecimaldigits</parameter> parameter
@@ -1017,9 +1017,6 @@ SELECT ST_AsGML(3, ST_GeomFromEWKT('POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0
</para>
</warning>
- <para>Version 1: ST_AsKML(geom_or_geog, maxdecimaldigits) / version=2 / maxdecimaldigits=15 </para>
- <para>Version 2: ST_AsKML(version, geom_or_geog, maxdecimaldigits, nprefix) maxdecimaldigits=15 / nprefix=NULL </para>
-
<note>
<para>Requires PostGIS be compiled with Proj support. Use <xref linkend="PostGIS_Full_Version" /> to confirm you have proj support compiled in.</para>
</note>
@@ -1028,10 +1025,10 @@ SELECT ST_AsGML(3, ST_GeomFromEWKT('POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0
<para>Availability: 1.2.2 - later variants that include version param came in 1.3.2</para>
</note>
<note>
- <para>Enhanced: 2.0.0 - Add prefix namespace. Default is no prefix</para>
+ <para>Enhanced: 2.0.0 - Add prefix namespace, use default and named args</para>
</note>
<note>
- <para>Changed: 2.0.0 - uses default args and supports named args</para>
+ <para>Changed: 3.0.0 - Removed the "versioned" variant signature</para>
</note>
<note>
commit 89949433f40e6586c8fa2568f8d26ccba268fd16
Author: Sandro Santilli <strk at kbt.io>
Date: Sun Dec 19 22:48:45 2021 +0100
Replace ST_AsKML deprecated signatures drop with Replaces comments
Includes regression test
diff --git a/postgis/geography.sql.in b/postgis/geography.sql.in
index 7d7b6da5f..90ca01723 100644
--- a/postgis/geography.sql.in
+++ b/postgis/geography.sql.in
@@ -452,6 +452,7 @@ CREATE OR REPLACE FUNCTION ST_AsGML(text)
-- AsKML(geography,precision)
-- Changed: 2.0.0 to use default args and named args
+-- Replaces ST_AsKML(geography, int4) deprecated in 2.0.0
CREATE OR REPLACE FUNCTION ST_AsKML(geog geography, maxdecimaldigits int4 DEFAULT 15, nprefix text DEFAULT '')
RETURNS text
AS 'MODULE_PATHNAME','geography_as_kml'
diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in
index 0beca01aa..5c8ef4c2b 100644
--- a/postgis/postgis.sql.in
+++ b/postgis/postgis.sql.in
@@ -4789,6 +4789,7 @@ CREATE OR REPLACE FUNCTION ST_AsGML(version int4, geom geometry, maxdecimaldigit
-- Availability: 1.2.2
-- Changed: 2.0.0 to use default args and allow named args
+-- Replaces ST_AsKML(geometry, int4) deprecated in 2.0.0
CREATE OR REPLACE FUNCTION ST_AsKML(geom geometry, maxdecimaldigits int4 DEFAULT 15, nprefix TEXT default '')
RETURNS TEXT
AS 'MODULE_PATHNAME','LWGEOM_asKML'
diff --git a/postgis/postgis_after_upgrade.sql b/postgis/postgis_after_upgrade.sql
index a7b929ffd..bab8d358e 100644
--- a/postgis/postgis_after_upgrade.sql
+++ b/postgis/postgis_after_upgrade.sql
@@ -197,7 +197,6 @@ DROP FUNCTION IF EXISTS ST_Distance(geography, geography, float8, boolean);
DROP FUNCTION IF EXISTS ST_Buffer(geometry, float8, cstring);
DROP FUNCTION IF EXISTS ST_IsValidDetail(geometry);
DROP FUNCTION IF EXISTS ST_AsKML(int4, geometry, int4, text);
-DROP FUNCTION IF EXISTS ST_AsKML(geometry, int4);
DROP FUNCTION IF EXISTS ST_AsGeoJson(int4, geometry, int4, int4);
DROP FUNCTION IF EXISTS _ST_AsGeoJson(int4, geometry, int4, int4);
diff --git a/postgis/postgis_before_upgrade.sql b/postgis/postgis_before_upgrade.sql
index 3ba6956bf..ea84c524f 100644
--- a/postgis/postgis_before_upgrade.sql
+++ b/postgis/postgis_before_upgrade.sql
@@ -195,12 +195,6 @@ SELECT _postgis_drop_function_if_needed
);
--- FUNCTION st_askml changed to add defaults in 3.0 / r17357
--- These signatures were superseeded
-DROP FUNCTION IF EXISTS st_askml(geometry, integer); -- Does not conflict
-DROP FUNCTION IF EXISTS st_askml(geography, integer); -- Does not conflict
-
-
-- FUNCTION st_buffer changed to add defaults in 3.0
-- This signature was superseeded
DROP FUNCTION IF EXISTS st_buffer(geometry, double precision); -- Does not conflict
diff --git a/regress/hooks/hook-after-upgrade.sql b/regress/hooks/hook-after-upgrade.sql
index 231f3c972..4343f448a 100644
--- a/regress/hooks/hook-after-upgrade.sql
+++ b/regress/hooks/hook-after-upgrade.sql
@@ -3,6 +3,7 @@ DROP VIEW IF EXISTS upgrade_view_test_unaryunion;
DROP VIEW IF EXISTS upgrade_view_test_subdivide;
DROP VIEW IF EXISTS upgrade_view_test_union;
DROP VIEW IF EXISTS upgrade_view_test_force_dims;
+DROP VIEW IF EXISTS upgrade_view_test_askml;
DROP TABLE upgrade_test;
-- Drop functions deprecated on upgrade
diff --git a/regress/hooks/hook-before-upgrade.sql b/regress/hooks/hook-before-upgrade.sql
index 07c54dda1..e5e541888 100644
--- a/regress/hooks/hook-before-upgrade.sql
+++ b/regress/hooks/hook-before-upgrade.sql
@@ -58,3 +58,11 @@ SELECT
ST_Force3DM(g1) as geometry_force3dm,
ST_Force4D(g1) as geometry_force4d
FROM upgrade_test;
+
+-- Add view using ST_AsKML function
+-- NOTE: 2.0.0 changed them to add default params
+CREATE VIEW upgrade_view_test_askml AS
+SELECT
+ ST_AsKML(g1) as geometry_askml,
+ ST_AsKML(g2) as geography_askml
+FROM upgrade_test;
commit 034dae8055786d7d968930bde9afacc3e383a209
Author: Sandro Santilli <strk at kbt.io>
Date: Sun Dec 19 19:38:19 2021 +0100
Allow upgrades from <3.1 when using ST_Force{3D,3DM,3DZ,4D} in views
diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in
index 003d8b60f..0beca01aa 100644
--- a/postgis/postgis.sql.in
+++ b/postgis/postgis.sql.in
@@ -1382,6 +1382,7 @@ CREATE OR REPLACE FUNCTION ST_Force2D(geometry)
-- Availability: 2.1.0
-- Changed: 3.1.0 - add zvalue=0.0 parameter
+-- Replaces ST_Force3DZ(geometry) deprecated in 3.1.0
CREATE OR REPLACE FUNCTION ST_Force3DZ(geom geometry, zvalue float8 default 0.0)
RETURNS geometry
AS 'MODULE_PATHNAME', 'LWGEOM_force_3dz'
@@ -1390,6 +1391,7 @@ CREATE OR REPLACE FUNCTION ST_Force3DZ(geom geometry, zvalue float8 default 0.0)
-- Availability: 2.1.0
-- Changed: 3.1.0 - add zvalue=0.0 parameter
+-- Replaces ST_Force3D(geometry) deprecated in 3.1.0
CREATE OR REPLACE FUNCTION ST_Force3D(geom geometry, zvalue float8 default 0.0)
RETURNS geometry
AS 'SELECT @extschema at .ST_Force3DZ($1, $2)'
@@ -1398,6 +1400,7 @@ CREATE OR REPLACE FUNCTION ST_Force3D(geom geometry, zvalue float8 default 0.0)
-- Availability: 2.1.0
-- Changed: 3.1.0 - add mvalue=0.0 parameter
+-- Replaces ST_Force3DM(geometry) deprecated in 3.1.0
CREATE OR REPLACE FUNCTION ST_Force3DM(geom geometry, mvalue float8 default 0.0)
RETURNS geometry
AS 'MODULE_PATHNAME', 'LWGEOM_force_3dm'
@@ -1406,6 +1409,7 @@ CREATE OR REPLACE FUNCTION ST_Force3DM(geom geometry, mvalue float8 default 0.0)
-- Availability: 2.1.0
-- Changed: 3.1.0 - add zvalue=0.0 and mvalue=0.0 parameters
+-- Replaces ST_Force4D(geometry) deprecated in 3.1.0
CREATE OR REPLACE FUNCTION ST_Force4D(geom geometry, zvalue float8 default 0.0, mvalue float8 default 0.0)
RETURNS geometry
AS 'MODULE_PATHNAME', 'LWGEOM_force_4d'
diff --git a/postgis/postgis_before_upgrade.sql b/postgis/postgis_before_upgrade.sql
index fd104bc8e..3ba6956bf 100644
--- a/postgis/postgis_before_upgrade.sql
+++ b/postgis/postgis_before_upgrade.sql
@@ -194,13 +194,6 @@ SELECT _postgis_drop_function_if_needed
'zoom integer, x integer, y integer, bounds geometry DEFAULT ''0102000020110F00000200000052107C45F81B73C152107C45F81B73C152107C45F81B734152107C45F81B7341''::geometry'
);
--- FUNCTION ST_Force3D, ST_Force3DZ, ST_Force3DM, ST_Force4DZ changed to add defaults in 3.1
--- These signatures were superseeded
-DROP FUNCTION IF EXISTS ST_Force3D(geometry); -- Does not conflict
-DROP FUNCTION IF EXISTS ST_Force3DZ(geometry); -- Does not conflict
-DROP FUNCTION IF EXISTS ST_Force3DM(geometry); -- Does not conflict
-DROP FUNCTION IF EXISTS ST_Force4D(geometry); -- Does not conflict
-
-- FUNCTION st_askml changed to add defaults in 3.0 / r17357
-- These signatures were superseeded
diff --git a/regress/hooks/hook-after-upgrade.sql b/regress/hooks/hook-after-upgrade.sql
index 775e0239d..231f3c972 100644
--- a/regress/hooks/hook-after-upgrade.sql
+++ b/regress/hooks/hook-after-upgrade.sql
@@ -2,6 +2,7 @@ DROP VIEW IF EXISTS upgrade_view_test_overlay;
DROP VIEW IF EXISTS upgrade_view_test_unaryunion;
DROP VIEW IF EXISTS upgrade_view_test_subdivide;
DROP VIEW IF EXISTS upgrade_view_test_union;
+DROP VIEW IF EXISTS upgrade_view_test_force_dims;
DROP TABLE upgrade_test;
-- Drop functions deprecated on upgrade
diff --git a/regress/hooks/hook-before-upgrade.sql b/regress/hooks/hook-before-upgrade.sql
index de661643d..07c54dda1 100644
--- a/regress/hooks/hook-before-upgrade.sql
+++ b/regress/hooks/hook-before-upgrade.sql
@@ -47,3 +47,14 @@ CREATE VIEW upgrade_view_test_subdivide AS
SELECT
ST_Subdivide(g1, 256) as geometry_subdivide
FROM upgrade_test;
+
+-- Add view using ST_ForceX function
+-- NOTE: 3.1.0 changed them from taking only geometry
+-- to also take optional zvalue/mvalue params
+CREATE VIEW upgrade_view_test_force_dims AS
+SELECT
+ ST_Force3D(g1) as geometry_force3d,
+ ST_Force3DZ(g1) as geometry_force3dz,
+ ST_Force3DM(g1) as geometry_force3dm,
+ ST_Force4D(g1) as geometry_force4d
+FROM upgrade_test;
-----------------------------------------------------------------------
Summary of changes:
doc/reference_output.xml | 15 ++++++---------
postgis/geography.sql.in | 1 +
postgis/postgis.sql.in | 5 +++++
postgis/postgis_after_upgrade.sql | 1 -
postgis/postgis_before_upgrade.sql | 13 -------------
regress/hooks/hook-after-upgrade.sql | 2 ++
regress/hooks/hook-before-upgrade.sql | 19 +++++++++++++++++++
7 files changed, 33 insertions(+), 23 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list