[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0rc1-151-gadc0c61

git at osgeo.org git at osgeo.org
Tue Apr 20 16:49:06 PDT 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  adc0c61c6b65c11c50f0b490385a7e2070531c78 (commit)
       via  7b6bd02d6c69039a3355161712618608ae503f81 (commit)
      from  7ba7eb4c5a5f9b73198f692c2621e2e136cea3f4 (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 adc0c61c6b65c11c50f0b490385a7e2070531c78
Merge: 7b6bd02 7ba7eb4
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Tue Apr 20 16:47:59 2021 -0700

    Merge branch 'master' of https://git.osgeo.org/gitea/postgis/postgis

diff --cc doc/reference_raster.xml
index 0129831,fc838b9..ce8bd9a
--- a/doc/reference_raster.xml
+++ b/doc/reference_raster.xml
@@@ -4955,10 -4955,10 +4955,11 @@@ SELECT x, y, val, ST_AsText(geom
              <refsection>
                  <title>Description</title>
  
 -                <para>Returns the value of a given band in a given columnx, rowy pixel or at a given geometry point. Band numbers start at 1 and band is assumed to be 1 if not specified.
 -                If <varname>exclude_nodata_value</varname> is set to true, then only non <varname>nodata</varname> pixels are considered.  If <varname>exclude_nodata_value</varname> is set to false, then all pixels are considered.</para>
 +                <para>Returns the value of a given band in a given columnx, rowy pixel or at a given geometry point. Band numbers start at 1 and band is assumed to be 1 if not specified.</para>
 +                <para>If <varname>exclude_nodata_value</varname> is set to true, then only non <varname>nodata</varname> pixels are considered.  If <varname>exclude_nodata_value</varname> is set to false, then all pixels are considered.</para>
 +                <para>The allowed values of the <varname>resample</varname> parameter are "nearest" which performs the default nearest-neighbor resampling, and "bilinear" which performs a <ulink url="https://en.wikipedia.org/wiki/Bilinear_interpolation">bilinear interpolation</ulink> to estimate the value between pixel centers.</para>
  
+                 <para>Enhanced: 3.2.0 resample optional argument was added.</para>
                  <para>Enhanced: 2.0.0 exclude_nodata_value optional argument was added.</para>
                  </refsection>
  
diff --cc raster/rt_pg/rtpostgis.sql.in
index c60a348,0c72dbc..7904aee
--- a/raster/rt_pg/rtpostgis.sql.in
+++ b/raster/rt_pg/rtpostgis.sql.in
@@@ -4616,21 -4616,23 +4616,23 @@@ CREATE OR REPLACE FUNCTION st_value(ras
      AS 'MODULE_PATHNAME','RASTER_getPixelValue'
      LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE;
  
 -CREATE OR REPLACE FUNCTION st_value(rast raster, x integer, y integer, exclude_nodata_value boolean DEFAULT TRUE)
 -    RETURNS float8
 -    AS $$ SELECT st_value($1, 1, $2, $3, $4) $$
 -    LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE;
 -
+ -- Changed: 3.2.0 added resample arg
  CREATE OR REPLACE FUNCTION st_value(rast raster, band integer, pt geometry, exclude_nodata_value boolean DEFAULT TRUE, resample text DEFAULT 'nearest')
  	RETURNS float8
  	AS 'MODULE_PATHNAME', 'RASTER_getPixelValueResample'
  	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE;
  
 +CREATE OR REPLACE FUNCTION st_value(rast raster, x integer, y integer, exclude_nodata_value boolean DEFAULT TRUE)
 +    RETURNS float8
 +    AS $$ SELECT st_value($1, 1::integer, $2, $3, $4) $$
 +    LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE;
 +
  CREATE OR REPLACE FUNCTION st_value(rast raster, pt geometry, exclude_nodata_value boolean DEFAULT TRUE)
      RETURNS float8
 -    AS $$ SELECT @extschema at .ST_value($1, 1, $2, $3, 'nearest') $$
 +    AS $$ SELECT @extschema at .ST_value($1, 1::integer, $2, $3, 'nearest'::text) $$
      LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE;
  
+ -- Availability: 3.2.0 added resample arg
  CREATE OR REPLACE FUNCTION st_setz(rast raster, geom geometry, resample text DEFAULT 'nearest', band integer default 1)
  	RETURNS geometry
  	AS 'MODULE_PATHNAME', 'RASTER_getGeometryValues'

commit 7b6bd02d6c69039a3355161712618608ae503f81
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Tue Apr 20 16:44:27 2021 -0700

    Bring documentation into line with .sql functionality so that comments do not complain.

diff --git a/doc/reference_raster.xml b/doc/reference_raster.xml
index b0f5a45..0129831 100644
--- a/doc/reference_raster.xml
+++ b/doc/reference_raster.xml
@@ -4932,6 +4932,7 @@ SELECT x, y, val, ST_AsText(geom)
                     <paramdef><type>integer </type> <parameter>band</parameter></paramdef>
                     <paramdef><type>geometry </type> <parameter>pt</parameter></paramdef>
                     <paramdef choice="opt"><type>boolean </type> <parameter>exclude_nodata_value=true</parameter></paramdef>
+                    <paramdef choice="opt"><type>text </type> <parameter>resample=nearest</parameter></paramdef>
                   </funcprototype>
                   <funcprototype>
                     <funcdef>double precision <function>ST_Value</function></funcdef>
@@ -4954,8 +4955,9 @@ SELECT x, y, val, ST_AsText(geom)
             <refsection>
                 <title>Description</title>
 
-                <para>Returns the value of a given band in a given columnx, rowy pixel or at a given geometry point. Band numbers start at 1 and band is assumed to be 1 if not specified.
-                If <varname>exclude_nodata_value</varname> is set to true, then only non <varname>nodata</varname> pixels are considered.  If <varname>exclude_nodata_value</varname> is set to false, then all pixels are considered.</para>
+                <para>Returns the value of a given band in a given columnx, rowy pixel or at a given geometry point. Band numbers start at 1 and band is assumed to be 1 if not specified.</para>
+                <para>If <varname>exclude_nodata_value</varname> is set to true, then only non <varname>nodata</varname> pixels are considered.  If <varname>exclude_nodata_value</varname> is set to false, then all pixels are considered.</para>
+                <para>The allowed values of the <varname>resample</varname> parameter are "nearest" which performs the default nearest-neighbor resampling, and "bilinear" which performs a <ulink url="https://en.wikipedia.org/wiki/Bilinear_interpolation">bilinear interpolation</ulink> to estimate the value between pixel centers.</para>
 
                 <para>Enhanced: 2.0.0 exclude_nodata_value optional argument was added.</para>
                 </refsection>
@@ -5269,7 +5271,7 @@ FROM (
             <refsynopsisdiv>
                 <funcsynopsis>
                    <funcprototype>
-                    <funcdef>geometry <function>ST_GetValues</function></funcdef>
+                    <funcdef>geometry <function>ST_SetZ</function></funcdef>
                     <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
                     <paramdef><type>geometry </type> <parameter>geom</parameter></paramdef>
                     <paramdef choice="opt"><type>text </type> <parameter>resample=nearest</parameter></paramdef>
@@ -5342,7 +5344,7 @@ FROM test_raster
             <refsynopsisdiv>
                 <funcsynopsis>
                    <funcprototype>
-                    <funcdef>geometry <function>ST_GetValues</function></funcdef>
+                    <funcdef>geometry <function>ST_SetM</function></funcdef>
                     <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
                     <paramdef><type>geometry </type> <parameter>geom</parameter></paramdef>
                     <paramdef choice="opt"><type>text </type> <parameter>resample=nearest</parameter></paramdef>
diff --git a/postgis/lwgeom_geos_clean.c b/postgis/lwgeom_geos_clean.c
index fbec291..db099d6 100644
--- a/postgis/lwgeom_geos_clean.c
+++ b/postgis/lwgeom_geos_clean.c
@@ -48,8 +48,6 @@ Datum ST_MakeValid(PG_FUNCTION_ARGS)
 	in = PG_GETARG_GSERIALIZED_P_COPY(0);
 	lwgeom_in = lwgeom_from_gserialized(in);
 
-	POSTGIS_DEBUG(1, "ST_MakeValid enter");
-
 	switch ( lwgeom_in->type )
 	{
 	case POINTTYPE:
diff --git a/raster/rt_pg/rtpostgis.sql.in b/raster/rt_pg/rtpostgis.sql.in
index c31e26c..c60a348 100644
--- a/raster/rt_pg/rtpostgis.sql.in
+++ b/raster/rt_pg/rtpostgis.sql.in
@@ -4616,19 +4616,19 @@ CREATE OR REPLACE FUNCTION st_value(rast raster, band integer, x integer, y inte
     AS 'MODULE_PATHNAME','RASTER_getPixelValue'
     LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE;
 
-CREATE OR REPLACE FUNCTION st_value(rast raster, x integer, y integer, exclude_nodata_value boolean DEFAULT TRUE)
-    RETURNS float8
-    AS $$ SELECT st_value($1, 1, $2, $3, $4) $$
-    LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE;
-
 CREATE OR REPLACE FUNCTION st_value(rast raster, band integer, pt geometry, exclude_nodata_value boolean DEFAULT TRUE, resample text DEFAULT 'nearest')
 	RETURNS float8
 	AS 'MODULE_PATHNAME', 'RASTER_getPixelValueResample'
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE;
 
+CREATE OR REPLACE FUNCTION st_value(rast raster, x integer, y integer, exclude_nodata_value boolean DEFAULT TRUE)
+    RETURNS float8
+    AS $$ SELECT st_value($1, 1::integer, $2, $3, $4) $$
+    LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE;
+
 CREATE OR REPLACE FUNCTION st_value(rast raster, pt geometry, exclude_nodata_value boolean DEFAULT TRUE)
     RETURNS float8
-    AS $$ SELECT @extschema at .ST_value($1, 1, $2, $3, 'nearest') $$
+    AS $$ SELECT @extschema at .ST_value($1, 1::integer, $2, $3, 'nearest'::text) $$
     LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE;
 
 CREATE OR REPLACE FUNCTION st_setz(rast raster, geom geometry, resample text DEFAULT 'nearest', band integer default 1)

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

Summary of changes:
 doc/reference_raster.xml      |  5 +++--
 postgis/lwgeom_geos_clean.c   |  2 --
 raster/rt_pg/rtpostgis.sql.in | 12 ++++++------
 3 files changed, 9 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list