[SCM] PostGIS branch stable-3.4 updated. 3.4.3-16-gdbbac2278
git at osgeo.org
git at osgeo.org
Sun Oct 27 14:29:43 PDT 2024
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.4 has been updated
via dbbac22788b5cd2047af00a5b2bb346e22c0ee33 (commit)
via a914ff72de3bb627288c463f3918b4e40980a793 (commit)
from 0fac38a7492cc3b034dea9ec86efaefef6a1a9e0 (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 dbbac22788b5cd2047af00a5b2bb346e22c0ee33
Author: Regina Obe <lr at pcorp.us>
Date: Sun Oct 27 17:29:39 2024 -0400
Switch berrie64 to use 3.12.3 (corresponds to 3.12 branch)
diff --git a/ci/berrie64/configs.sh b/ci/berrie64/configs.sh
index 449d6b5c7..c5773ef2f 100644
--- a/ci/berrie64/configs.sh
+++ b/ci/berrie64/configs.sh
@@ -1,5 +1,5 @@
export WORKSPACE=/home/jenkins/workspace
-export GEOS_VER=3.12.2
+export GEOS_VER=3.12.3
export OS_BUILD=64
export PG_VER=16
commit a914ff72de3bb627288c463f3918b4e40980a793
Author: Regina Obe <lr at pcorp.us>
Date: Sun Oct 27 17:04:43 2024 -0400
MISSING SCHEMA qualifications
Schema qualify all uses of spatial_ref_sys and postgis functions in postgis.sql.in script
Schema qualify postgis and raster functions and types in rtpostgis.sql.in
Closes #5790 for PostGIS 3.4.4
diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in
index 81b69789f..7affd8c83 100644
--- a/postgis/postgis.sql.in
+++ b/postgis/postgis.sql.in
@@ -405,6 +405,12 @@ CREATE OR REPLACE FUNCTION geometry_eq(geom1 geometry, geom2 geometry)
LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
_COST_DEFAULT;
+
+
+
+
+
+
CREATE OR REPLACE FUNCTION geometry_cmp(geom1 geometry, geom2 geometry)
RETURNS integer
AS 'MODULE_PATHNAME', 'lwgeom_cmp'
@@ -442,6 +448,13 @@ CREATE OPERATOR = (
RESTRICT = contsel, JOIN = contjoinsel, HASHES, MERGES
);
+
+
+
+
+
+
+
-- Availability: 0.9.0
CREATE OPERATOR >= (
LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_ge,
@@ -1654,6 +1667,20 @@ CREATE OR REPLACE FUNCTION ST_NDims(geometry)
LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
_COST_DEFAULT;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_AsEWKT(geometry)
RETURNS TEXT
@@ -2404,7 +2431,7 @@ BEGIN
RAISE EXCEPTION 'AddGeometryColumn() - SRID must be <= %', SRID_USR_MAX;
END IF;
new_srid := new_srid_in;
- SELECT SRID INTO sr FROM spatial_ref_sys WHERE SRID = new_srid;
+ SELECT SRID INTO sr FROM @extschema at .spatial_ref_sys WHERE SRID = new_srid;
IF NOT FOUND THEN
RAISE EXCEPTION 'AddGeometryColumn() - invalid SRID';
RETURN 'fail';
@@ -2761,7 +2788,7 @@ BEGIN
-- Ensure that new_srid is valid
IF ( new_srid > 0 ) THEN
- IF ( SELECT count(*) = 0 from spatial_ref_sys where srid = new_srid ) THEN
+ IF ( SELECT count(*) = 0 from @extschema at .spatial_ref_sys where srid = new_srid ) THEN
RAISE EXCEPTION 'invalid SRID: % not found in spatial_ref_sys', new_srid;
RETURN false;
END IF;
@@ -3033,6 +3060,11 @@ CREATE OR REPLACE FUNCTION postgis_proj_version() RETURNS text
LANGUAGE 'c' IMMUTABLE
_COST_DEFAULT;
+
+
+
+
+
CREATE OR REPLACE FUNCTION postgis_wagyu_version() RETURNS text
AS 'MODULE_PATHNAME'
LANGUAGE 'c' IMMUTABLE
@@ -3223,6 +3255,7 @@ DECLARE
libver text;
librev text;
projver text;
+
geosver text;
geosver_compiled text;
sfcgalver text;
@@ -3248,6 +3281,7 @@ BEGIN
SELECT @extschema at .postgis_proj_version() INTO projver;
SELECT @extschema at .postgis_geos_version() INTO geosver;
SELECT @extschema at .postgis_geos_compiled_version() INTO geosver_compiled;
+
SELECT @extschema at .postgis_libjson_version() INTO json_lib_ver;
SELECT @extschema at .postgis_libprotobuf_version() INTO protobuf_lib_ver;
SELECT @extschema at .postgis_wagyu_version() INTO wagyu_lib_ver;
@@ -3346,6 +3380,9 @@ BEGIN
IF projver IS NOT NULL THEN
fullver = fullver || ' PROJ="' || projver || '"';
+
+
+
END IF;
IF gdalver IS NOT NULL THEN
@@ -5033,6 +5070,8 @@ CREATE OR REPLACE FUNCTION ST_AsGeoJson(geom geometry, maxdecimaldigits integer
_COST_MEDIUM;
-- Availability: 3.0.0
+
+
CREATE OR REPLACE FUNCTION ST_AsGeoJson(r record, geom_column text DEFAULT '', maxdecimaldigits integer DEFAULT 9, pretty_bool bool DEFAULT false)
RETURNS text
AS 'MODULE_PATHNAME','ST_AsGeoJsonRow'
@@ -6511,6 +6550,18 @@ CREATE OR REPLACE FUNCTION ST_LineToCurve(Geometry geometry)
LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
_COST_HIGH;
+
+
+
+
+
+
+
+
+
+
+
+
-------------------------------------------------------------------------------
-- SQL/MM - SQL Functions on type ST_Point
-------------------------------------------------------------------------------
@@ -6840,7 +6891,7 @@ $$
var_cent := @extschema at .ST_Centroid(var_param_geom);
IF (@extschema at .ST_XMax(var_enline) - @extschema at .ST_XMin(var_enline) ) > var_buf AND (@extschema at .ST_YMax(var_enline) - @extschema at .ST_YMin(var_enline) ) > var_buf THEN
IF @extschema at .ST_Dwithin(@extschema at .ST_Centroid(var_convhull) , @extschema at .ST_Centroid(@extschema at .ST_Envelope(var_param_geom)), var_buf/2) THEN
- -- If the geometric dimension is > 1 and the object is symettric (cutting at centroid will not work -- offset a bit)
+ -- If the geometric dimension is > 1 and the object is symmetric (cutting at centroid will not work -- offset a bit)
var_cent := @extschema at .ST_Translate(var_cent, (@extschema at .ST_XMax(var_enline) - @extschema at .ST_XMin(var_enline))/1000, (@extschema at .ST_YMAX(var_enline) - @extschema at .ST_YMin(var_enline))/1000);
ELSE
-- uses closest point on geometry to centroid. I can't explain why we are doing this
@@ -6934,7 +6985,7 @@ CREATE OR REPLACE FUNCTION ST_AsX3D(geom geometry, maxdecimaldigits integer DEFA
-- Availability: 2.3.0
-- has to be here because need ST_StartPoint
CREATE OR REPLACE FUNCTION ST_Angle(line1 geometry, line2 geometry)
- RETURNS float8 AS 'SELECT ST_Angle(St_StartPoint($1), ST_EndPoint($1), St_StartPoint($2), ST_EndPoint($2))'
+ RETURNS float8 AS 'SELECT @extschema at .ST_Angle(@extschema at .St_StartPoint($1), @extschema at .ST_EndPoint($1), @extschema at .ST_StartPoint($2), @extschema at .ST_EndPoint($2))'
LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE
_COST_LOW;
@@ -6953,5 +7004,25 @@ CREATE OR REPLACE FUNCTION ST_3DLineInterpolatePoint(geometry, float8)
-- moved to separate file cause its involved
#include "postgis_spgist.sql.in"
#include "postgis_letters.sql"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
COMMIT;
diff --git a/raster/rt_pg/rtpostgis.sql.in b/raster/rt_pg/rtpostgis.sql.in
index e2c56f3d1..7a144fd15 100644
--- a/raster/rt_pg/rtpostgis.sql.in
+++ b/raster/rt_pg/rtpostgis.sql.in
@@ -282,7 +282,7 @@ CREATE OR REPLACE FUNCTION st_summary(rast raster)
msg text;
msgset text[];
BEGIN
- extent := @extschema at .ST_Extent(rast::geometry);
+ extent := @extschema at .ST_Extent(rast::@extschema at .geometry);
metadata := @extschema at .ST_Metadata(rast);
msg := 'Raster of ' || metadata.width || 'x' || metadata.height || ' pixels has ' || metadata.numbands || ' ';
@@ -389,7 +389,7 @@ CREATE OR REPLACE FUNCTION st_addband(
nodataval float8 DEFAULT NULL
)
RETURNS raster
- AS $$ SELECT @extschema at .ST_addband($1, ARRAY[ROW($2, $3, $4, $5)]::addbandarg[]) $$
+ AS $$ SELECT @extschema at .ST_addband($1, ARRAY[ROW($2, $3, $4, $5)]::@extschema at .addbandarg[]) $$
LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
-- This function can not be STRICT, because nodataval can be NULL indicating that no nodata value should be set
@@ -400,7 +400,7 @@ CREATE OR REPLACE FUNCTION st_addband(
nodataval float8 DEFAULT NULL
)
RETURNS raster
- AS $$ SELECT @extschema at .ST_addband($1, ARRAY[ROW(NULL, $2, $3, $4)]::addbandarg[]) $$
+ AS $$ SELECT @extschema at .ST_addband($1, ARRAY[ROW(NULL, $2, $3, $4)]::@extschema at .addbandarg[]) $$
LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
-- This function can not be STRICT, because torastindex can not be determined (could be st_numbands(raster) though)
@@ -1347,12 +1347,12 @@ CREATE OR REPLACE FUNCTION st_reclass(rast raster, VARIADIC reclassargset reclas
-- Cannot be strict as "nodataval" can be NULL
CREATE OR REPLACE FUNCTION st_reclass(rast raster, nband int, reclassexpr text, pixeltype text, nodataval double precision DEFAULT NULL)
RETURNS raster
- AS $$ SELECT st_reclass($1, ROW($2, $3, $4, $5)) $$
+ AS $$ SELECT @extschema at .st_reclass($1, ROW($2, $3, $4, $5)) $$
LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
CREATE OR REPLACE FUNCTION st_reclass(rast raster, reclassexpr text, pixeltype text)
RETURNS raster
- AS $$ SELECT st_reclass($1, ROW(1, $2, $3, NULL)) $$
+ AS $$ SELECT @extschema at .st_reclass($1, ROW(1, $2, $3, NULL)) $$
LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE;
-----------------------------------------------------------------------
@@ -1565,7 +1565,7 @@ CREATE OR REPLACE FUNCTION st_astiff(rast raster, options text[] DEFAULT NULL, s
-- Cannot be strict as "options" and "srid" can be NULL
CREATE OR REPLACE FUNCTION st_astiff(rast raster, nbands int[], options text[] DEFAULT NULL, srid integer DEFAULT NULL)
RETURNS bytea
- AS $$ SELECT st_astiff(st_band($1, $2), $3, $4) $$
+ AS $$ SELECT @extschema at .st_astiff(@extschema at .st_band($1, $2), $3, $4) $$
LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
-- Cannot be strict as "srid" can be NULL
@@ -1656,7 +1656,7 @@ CREATE OR REPLACE FUNCTION st_astiff(rast raster, compression text, srid integer
-- Cannot be strict as "srid" can be NULL
CREATE OR REPLACE FUNCTION st_astiff(rast raster, nbands int[], compression text, srid integer DEFAULT NULL)
RETURNS bytea
- AS $$ SELECT st_astiff(st_band($1, $2), $3, $4) $$
+ AS $$ SELECT @extschema at .st_astiff(@extschema at .st_band($1, $2), $3, $4) $$
LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
-----------------------------------------------------------------------
@@ -1675,13 +1675,13 @@ CREATE OR REPLACE FUNCTION st_asjpeg(rast raster, options text[] DEFAULT NULL)
RETURN NULL;
END IF;
- num_bands := st_numbands($1);
+ num_bands := @extschema at .st_numbands($1);
-- JPEG allows 1 or 3 bands
IF num_bands <> 1 AND num_bands <> 3 THEN
RAISE NOTICE 'The JPEG format only permits one or three bands. The first band will be used.';
- rast2 := st_band(rast, ARRAY[1]);
- num_bands := st_numbands(rast);
+ rast2 := @extschema at .st_band(rast, ARRAY[1]);
+ num_bands := @extschema at .st_numbands(rast);
ELSE
rast2 := rast;
END IF;
@@ -1693,14 +1693,14 @@ CREATE OR REPLACE FUNCTION st_asjpeg(rast raster, options text[] DEFAULT NULL)
END IF;
END LOOP;
- RETURN st_asgdalraster(rast2, 'JPEG', $2, NULL);
+ RETURN @extschema at .st_asgdalraster(rast2, 'JPEG', $2, NULL);
END;
$$ LANGUAGE 'plpgsql' IMMUTABLE PARALLEL SAFE;
-- Cannot be strict as "options" can be NULL
CREATE OR REPLACE FUNCTION st_asjpeg(rast raster, nbands int[], options text[] DEFAULT NULL)
RETURNS bytea
- AS $$ SELECT st_asjpeg(st_band($1, $2), $3) $$
+ AS $$ SELECT @extschema at .st_asjpeg(@extschema at .st_band($1, $2), $3) $$
LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
CREATE OR REPLACE FUNCTION st_asjpeg(rast raster, nbands int[], quality int)
@@ -1722,7 +1722,7 @@ CREATE OR REPLACE FUNCTION st_asjpeg(rast raster, nbands int[], quality int)
options := array_append(options, 'QUALITY=' || quality2);
END IF;
- RETURN @extschema at .st_asjpeg(st_band($1, $2), options);
+ RETURN @extschema at .st_asjpeg(@extschema at .st_band($1, $2), options);
END;
$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT PARALLEL SAFE;
@@ -1802,13 +1802,13 @@ CREATE OR REPLACE FUNCTION st_aspng(rast raster, nbands int[], compression int)
options := array_append(options, 'ZLEVEL=' || compression2);
END IF;
- RETURN @extschema at .st_aspng(st_band($1, $2), options);
+ RETURN @extschema at .st_aspng(@extschema at .st_band($1, $2), options);
END;
$$ LANGUAGE 'plpgsql' IMMUTABLE STRICT PARALLEL SAFE;
CREATE OR REPLACE FUNCTION st_aspng(rast raster, nband int, options text[] DEFAULT NULL)
RETURNS bytea
- AS $$ SELECT @extschema at .st_aspng(st_band($1, $2), $3) $$
+ AS $$ SELECT @extschema at .st_aspng(@extschema at .st_band($1, $2), $3) $$
LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
CREATE OR REPLACE FUNCTION st_aspng(rast raster, nband int, compression int)
@@ -2713,7 +2713,7 @@ CREATE OR REPLACE FUNCTION st_mapalgebra(
VARIADIC userargs text[] DEFAULT NULL
)
RETURNS raster
- AS $$ SELECT @extschema at ._ST_MapAlgebra(ARRAY[ROW($1, $2)]::rastbandarg[], $3, $4, $7, $8, $5, $6,NULL::double precision [],NULL::boolean, VARIADIC $9) $$
+ AS $$ SELECT @extschema at ._ST_MapAlgebra(ARRAY[ROW($1, $2)]::@extschema at .rastbandarg[], $3, $4, $7, $8, $5, $6,NULL::double precision [],NULL::boolean, VARIADIC $9) $$
LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
CREATE OR REPLACE FUNCTION st_mapalgebra(
@@ -2726,7 +2726,7 @@ CREATE OR REPLACE FUNCTION st_mapalgebra(
VARIADIC userargs text[] DEFAULT NULL
)
RETURNS raster
- AS $$ SELECT @extschema at ._ST_MapAlgebra(ARRAY[ROW($1, $2), ROW($3, $4)]::rastbandarg[], $5, $6, $9, $10, $7, $8,NULL::double precision [],NULL::boolean, VARIADIC $11) $$
+ AS $$ SELECT @extschema at ._ST_MapAlgebra(ARRAY[ROW($1, $2), ROW($3, $4)]::@extschema at .rastbandarg[], $5, $6, $9, $10, $7, $8,NULL::double precision [],NULL::boolean, VARIADIC $11) $$
LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
CREATE OR REPLACE FUNCTION st_mapalgebra(
@@ -2763,7 +2763,7 @@ CREATE OR REPLACE FUNCTION st_mapalgebra(
expression text, nodataval double precision DEFAULT NULL
)
RETURNS raster
- AS $$ SELECT @extschema at ._ST_mapalgebra(ARRAY[ROW($1, $2)]::rastbandarg[], $4, $3, 'FIRST', $5::text) $$
+ AS $$ SELECT @extschema at ._ST_mapalgebra(ARRAY[ROW($1, $2)]::@extschema at .rastbandarg[], $4, $3, 'FIRST', $5::text) $$
LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
CREATE OR REPLACE FUNCTION st_mapalgebra(
@@ -2784,7 +2784,7 @@ CREATE OR REPLACE FUNCTION st_mapalgebra(
nodatanodataval double precision DEFAULT NULL
)
RETURNS raster
- AS $$ SELECT @extschema at ._ST_mapalgebra(ARRAY[ROW($1, $2), ROW($3, $4)]::rastbandarg[], $5, $6, $7, $8, $9, $10) $$
+ AS $$ SELECT @extschema at ._ST_mapalgebra(ARRAY[ROW($1, $2), ROW($3, $4)]::@extschema at .rastbandarg[], $5, $6, $7, $8, $9, $10) $$
LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
CREATE OR REPLACE FUNCTION st_mapalgebra(
@@ -3717,7 +3717,7 @@ CREATE OR REPLACE FUNCTION st_aspect(
SELECT width, height INTO _width, _height FROM @extschema at .ST_Metadata(_rast);
RETURN @extschema at .ST_MapAlgebra(
- ARRAY[ROW(_rast, _nband)]::rastbandarg[],
+ ARRAY[ROW(_rast, _nband)]::@extschema at .rastbandarg[],
' @extschema at ._ST_aspect4ma(double precision[][][], integer[][], text[])'::regprocedure,
_pixtype,
_extenttype, _customextent,
@@ -3912,7 +3912,7 @@ CREATE OR REPLACE FUNCTION st_hillshade(
IF interpolate_nodata IS TRUE THEN
_rast := @extschema at .ST_MapAlgebra(
- ARRAY[ROW(rast, nband)]::rastbandarg[],
+ ARRAY[ROW(rast, nband)]::@extschema at .rastbandarg[],
'@extschema at .st_invdistweight4ma(double precision[][][], integer[][], text[])'::regprocedure,
pixeltype,
'FIRST', NULL,
@@ -3932,7 +3932,7 @@ CREATE OR REPLACE FUNCTION st_hillshade(
SELECT width, height, scalex INTO _width, _height FROM @extschema at .ST_Metadata(_rast);
RETURN @extschema at .ST_MapAlgebra(
- ARRAY[ROW(_rast, _nband)]::rastbandarg[],
+ ARRAY[ROW(_rast, _nband)]::@extschema at .rastbandarg[],
' @extschema at ._ST_hillshade4ma(double precision[][][], integer[][], text[])'::regprocedure,
_pixtype,
_extenttype, _customextent,
@@ -4223,7 +4223,7 @@ CREATE OR REPLACE FUNCTION st_roughness(
END IF;
RETURN @extschema at .ST_MapAlgebra(
- ARRAY[ROW(_rast, _nband)]::rastbandarg[],
+ ARRAY[ROW(_rast, _nband)]::@extschema at .rastbandarg[],
' @extschema at ._ST_roughness4ma(double precision[][][], integer[][], text[])'::regprocedure,
_pixtype,
_extenttype, _customextent,
@@ -6344,7 +6344,7 @@ CREATE OR REPLACE FUNCTION ST_Intersection(geomin geometry, rast raster, band in
SELECT
emptygeom,
NULL::float8
- FROM ST_GeomCollFromText('GEOMETRYCOLLECTION EMPTY', ST_SRID($1)) emptygeom;
+ FROM @extschema at .ST_GeomCollFromText('GEOMETRYCOLLECTION EMPTY', ST_SRID($1)) emptygeom;
END IF;
END;
$$
@@ -6381,8 +6381,8 @@ CREATE OR REPLACE FUNCTION ST_Intersection(
RAISE EXCEPTION 'The two rasters do not have the same SRID';
END IF;
- newnodata1 := coalesce(nodataval[1], ST_BandNodataValue(rast1, band1), ST_MinPossibleValue(@extschema at .ST_BandPixelType(rast1, band1)));
- newnodata2 := coalesce(nodataval[2], ST_BandNodataValue(rast2, band2), ST_MinPossibleValue(@extschema at .ST_BandPixelType(rast2, band2)));
+ newnodata1 := coalesce(nodataval[1], @extschema at .ST_BandNodataValue(rast1, band1), ST_MinPossibleValue(@extschema at .ST_BandPixelType(rast1, band1)));
+ newnodata2 := coalesce(nodataval[2], @extschema at .ST_BandNodataValue(rast2, band2), ST_MinPossibleValue(@extschema at .ST_BandPixelType(rast2, band2)));
_returnband := upper(returnband);
@@ -6396,9 +6396,9 @@ CREATE OR REPLACE FUNCTION ST_Intersection(
rtn := @extschema at .ST_SetBandNodataValue(rtn, 1, newnodata2);
WHEN _returnband = 'BOTH' THEN
rtn := @extschema at .ST_MapAlgebraExpr(rast1, band1, rast2, band2, '[rast1.val]', @extschema at .ST_BandPixelType(rast1, band1), 'INTERSECTION', newnodata1::text, newnodata1::text, newnodata1);
- rtn := ST_SetBandNodataValue(rtn, 1, newnodata1);
- rtn := ST_AddBand(rtn, ST_MapAlgebraExpr(rast1, band1, rast2, band2, '[rast2.val]', @extschema at .ST_BandPixelType(rast2, band2), 'INTERSECTION', newnodata2::text, newnodata2::text, newnodata2));
- rtn := ST_SetBandNodataValue(rtn, 2, newnodata2);
+ rtn := @extschema at .ST_SetBandNodataValue(rtn, 1, newnodata1);
+ rtn := @extschema at .ST_AddBand(rtn, @extschema at .ST_MapAlgebraExpr(rast1, band1, rast2, band2, '[rast2.val]', @extschema at .ST_BandPixelType(rast2, band2), 'INTERSECTION', newnodata2::text, newnodata2::text, newnodata2));
+ rtn := @extschema at .ST_SetBandNodataValue(rtn, 2, newnodata2);
ELSE
RAISE EXCEPTION 'Unknown value provided for returnband: %', returnband;
RETURN NULL;
@@ -6415,7 +6415,7 @@ CREATE OR REPLACE FUNCTION st_intersection(
nodataval double precision
)
RETURNS raster AS
- $$ SELECT st_intersection($1, $2, $3, $4, $5, ARRAY[$6, $6]) $$
+ $$ SELECT @extschema at .st_intersection($1, $2, $3, $4, $5, ARRAY[$6, $6]) $$
LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
CREATE OR REPLACE FUNCTION st_intersection(
@@ -6424,7 +6424,7 @@ CREATE OR REPLACE FUNCTION st_intersection(
nodataval double precision[]
)
RETURNS raster AS
- $$ SELECT st_intersection($1, $2, $3, $4, 'BOTH', $5) $$
+ $$ SELECT @extschema at .st_intersection($1, $2, $3, $4, 'BOTH', $5) $$
LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
CREATE OR REPLACE FUNCTION st_intersection(
@@ -6433,7 +6433,7 @@ CREATE OR REPLACE FUNCTION st_intersection(
nodataval double precision
)
RETURNS raster AS
- $$ SELECT st_intersection($1, $2, $3, $4, 'BOTH', ARRAY[$5, $5]) $$
+ $$ SELECT @extschema at .st_intersection($1, $2, $3, $4, 'BOTH', ARRAY[$5, $5]) $$
LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
-- Variants without band number
@@ -6444,7 +6444,7 @@ CREATE OR REPLACE FUNCTION st_intersection(
nodataval double precision[] DEFAULT NULL
)
RETURNS raster AS
- $$ SELECT st_intersection($1, 1, $2, 1, $3, $4) $$
+ $$ SELECT @extschema at .st_intersection($1, 1, $2, 1, $3, $4) $$
LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
CREATE OR REPLACE FUNCTION st_intersection(
@@ -6454,7 +6454,7 @@ CREATE OR REPLACE FUNCTION st_intersection(
nodataval double precision
)
RETURNS raster AS
- $$ SELECT st_intersection($1, 1, $2, 1, $3, ARRAY[$4, $4]) $$
+ $$ SELECT @extschema at .st_intersection($1, 1, $2, 1, $3, ARRAY[$4, $4]) $$
LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
CREATE OR REPLACE FUNCTION st_intersection(
@@ -6463,7 +6463,7 @@ CREATE OR REPLACE FUNCTION st_intersection(
nodataval double precision[]
)
RETURNS raster AS
- $$ SELECT st_intersection($1, 1, $2, 1, 'BOTH', $3) $$
+ $$ SELECT @extschema at .st_intersection($1, 1, $2, 1, 'BOTH', $3) $$
LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
CREATE OR REPLACE FUNCTION st_intersection(
@@ -6472,7 +6472,7 @@ CREATE OR REPLACE FUNCTION st_intersection(
nodataval double precision
)
RETURNS raster AS
- $$ SELECT st_intersection($1, 1, $2, 1, 'BOTH', ARRAY[$3, $3]) $$
+ $$ SELECT @extschema at .st_intersection($1, 1, $2, 1, 'BOTH', ARRAY[$3, $3]) $$
LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
-----------------------------------------------------------------------
@@ -6678,7 +6678,7 @@ CREATE OR REPLACE FUNCTION st_nearestvalue(
exclude_nodata_value boolean DEFAULT TRUE
)
RETURNS double precision
- AS $$ SELECT st_nearestvalue($1, 1, $2, $3) $$
+ AS $$ SELECT @extschema at .st_nearestvalue($1, 1, $2, $3) $$
LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE;
CREATE OR REPLACE FUNCTION st_nearestvalue(
@@ -6687,7 +6687,7 @@ CREATE OR REPLACE FUNCTION st_nearestvalue(
exclude_nodata_value boolean DEFAULT TRUE
)
RETURNS double precision
- AS $$ SELECT st_nearestvalue($1, $2, st_setsrid(st_makepoint(st_rastertoworldcoordx($1, $3, $4), st_rastertoworldcoordy($1, $3, $4)), st_srid($1)), $5) $$
+ AS $$ SELECT @extschema at .st_nearestvalue($1, $2, @extschema at .st_setsrid(@extschema at .st_makepoint(@extschema at .st_rastertoworldcoordx($1, $3, $4), @extschema at .st_rastertoworldcoordy($1, $3, $4)), @extschema at .st_srid($1)), $5) $$
LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE;
CREATE OR REPLACE FUNCTION st_nearestvalue(
@@ -6696,7 +6696,7 @@ CREATE OR REPLACE FUNCTION st_nearestvalue(
exclude_nodata_value boolean DEFAULT TRUE
)
RETURNS double precision
- AS $$ SELECT st_nearestvalue($1, 1, st_setsrid(st_makepoint(st_rastertoworldcoordx($1, $2, $3), st_rastertoworldcoordy($1, $2, $3)), st_srid($1)), $4) $$
+ AS $$ SELECT @extschema at .st_nearestvalue($1, 1, @extschema at .st_setsrid(@extschema at .st_makepoint(@extschema at .st_rastertoworldcoordx($1, $2, $3), @extschema at .st_rastertoworldcoordy($1, $2, $3)), @extschema at .st_srid($1)), $4) $$
LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE;
-----------------------------------------------------------------------
@@ -6746,21 +6746,21 @@ CREATE OR REPLACE FUNCTION st_neighborhood(
wy double precision;
rtn double precision[][];
BEGIN
- IF (st_geometrytype($3) != 'ST_Point') THEN
+ IF (@extschema at .st_geometrytype($3) != 'ST_Point') THEN
RAISE EXCEPTION 'Attempting to get the neighbor of a pixel with a non-point geometry';
END IF;
- IF ST_SRID(rast) != ST_SRID(pt) THEN
+ IF @extschema at .ST_SRID(rast) != @extschema at .ST_SRID(pt) THEN
RAISE EXCEPTION 'Raster and geometry do not have the same SRID';
END IF;
- wx := st_x($3);
- wy := st_y($3);
+ wx := @extschema at .st_x($3);
+ wy := @extschema at .st_y($3);
SELECT @extschema at ._ST_neighborhood(
$1, $2,
- st_worldtorastercoordx(rast, wx, wy),
- st_worldtorastercoordy(rast, wx, wy),
+ @extschema at .st_worldtorastercoordx(rast, wx, wy),
+ @extschema at .st_worldtorastercoordy(rast, wx, wy),
$4, $5,
$6
) INTO rtn;
@@ -6775,7 +6775,7 @@ CREATE OR REPLACE FUNCTION st_neighborhood(
exclude_nodata_value boolean DEFAULT TRUE
)
RETURNS double precision[][]
- AS $$ SELECT st_neighborhood($1, 1, $2, $3, $4, $5) $$
+ AS $$ SELECT @extschema at .st_neighborhood($1, 1, $2, $3, $4, $5) $$
LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE;
------------------------------------------------------------------------------
@@ -6870,7 +6870,7 @@ CREATE OR REPLACE FUNCTION _add_raster_constraint_srid(rastschema name, rasttabl
cn := 'enforce_srid_' || $3;
- sql := 'SELECT st_srid('
+ sql := 'SELECT @extschema at .st_srid('
|| quote_ident($3)
|| ') FROM ' || fqtn
|| ' WHERE '
@@ -7040,7 +7040,7 @@ CREATE OR REPLACE FUNCTION _add_raster_constraint_blocksize(rastschema name, ras
cn := 'enforce_' || $4 || '_' || $3;
- sql := 'SELECT st_' || $4 || '('
+ sql := 'SELECT @extschema at .st_' || $4 || '('
|| quote_ident($3)
|| ') FROM ' || fqtn
|| ' GROUP BY 1 ORDER BY count(*) DESC';
@@ -7532,7 +7532,7 @@ CREATE OR REPLACE FUNCTION _add_raster_constraint_pixel_types(rastschema name, r
sql := 'ALTER TABLE ' || fqtn
|| ' ADD CONSTRAINT ' || quote_ident(cn)
- || ' CHECK (_raster_constraint_pixel_types(' || quote_ident($3)
+ || ' CHECK (_ at extschema@.raster_constraint_pixel_types(' || quote_ident($3)
|| ') = ''{';
FOR x in 1..max LOOP
sql := sql || '"' || attr[x] || '"';
@@ -7620,7 +7620,7 @@ CREATE OR REPLACE FUNCTION _add_raster_constraint_nodata_values(rastschema name,
sql := 'ALTER TABLE ' || fqtn
|| ' ADD CONSTRAINT ' || quote_ident(cn)
- || ' CHECK (_raster_constraint_nodata_values(' || quote_ident($3)
+ || ' CHECK (_ at extschema@.raster_constraint_nodata_values(' || quote_ident($3)
|| ')::numeric[] = ''{';
FOR x in 1..max LOOP
IF attr[x] IS NULL THEN
@@ -8238,7 +8238,7 @@ CREATE OR REPLACE FUNCTION DropRasterConstraints (
extent boolean DEFAULT TRUE
)
RETURNS boolean AS
- $$ SELECT DropRasterConstraints('', $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) $$
+ $$ SELECT @extschema at .DropRasterConstraints('', $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) $$
LANGUAGE 'sql' VOLATILE STRICT;
------------------------------------------------------------------------------
@@ -8688,23 +8688,23 @@ BEGIN
-- 2. Loop over each target tile and build it from source tiles
ipx := st_xmin(ext);
- ncols := ceil((st_xmax(ext)-ipx)/sfx/tw);
+ ncols := ceil((@extschema at .st_xmax(ext)-ipx)/sfx/tw);
IF sfy < 0 THEN
- ipy := st_ymax(ext);
- nlins := ceil((st_ymin(ext)-ipy)/sfy/th);
+ ipy := @extschema at .st_ymax(ext);
+ nlins := ceil((@extschema at .st_ymin(ext)-ipy)/sfy/th);
ELSE
- ipy := st_ymin(ext);
- nlins := ceil((st_ymax(ext)-ipy)/sfy/th);
+ ipy := @extschema at .st_ymin(ext);
+ nlins := ceil((@extschema at .st_ymax(ext)-ipy)/sfy/th);
END IF;
- srid := ST_Srid(ext);
+ srid := @extschema at .ST_Srid(ext);
RAISE DEBUG 'Target coverage will have % x % tiles, each of approx size % x %', ncols, nlins, tw, th;
RAISE DEBUG 'Target coverage will cover extent %', ext::box2d;
FOR tx IN 0..ncols-1 LOOP
FOR ty IN 0..nlins-1 LOOP
- te := ST_MakeEnvelope(ipx + tx * tw * sfx,
+ te := @extschema at .ST_MakeEnvelope(ipx + tx * tw * sfx,
ipy + ty * th * sfy,
ipx + (tx+1) * tw * sfx,
ipy + (ty+1) * th * sfy,
@@ -8719,9 +8719,9 @@ BEGIN
--RAISE DEBUG '% source tiles intersect target tile %,% with extent %', rec.count, tx, ty, te::box2d;
IF rec.g IS NULL THEN
RAISE WARNING 'No source tiles cover target tile %,% with extent %',
- tx, ty, te::box2d;
+ tx, ty, te::@extschema at .box2d;
ELSE
- --RAISE DEBUG 'Tile for extent % has size % x %', te::box2d, st_width(rec.g), st_height(rec.g);
+ --RAISE DEBUG 'Tile for extent % has size % x %', te::@extschema at .box2d, @extschema at .st_width(rec.g), @extschema at .st_height(rec.g);
RETURN NEXT rec.g;
END IF;
END LOOP;
@@ -8778,7 +8778,7 @@ BEGIN
ttab := 'o_' || factor || '_' || sinfo.tab;
sql := 'CREATE TABLE ' || quote_ident(sinfo.sch)
|| '.' || quote_ident(ttab)
- || ' AS SELECT ST_Retile($1, $2, $3, $4, $5, $6, $7) '
+ || ' AS SELECT @extschema at .ST_Retile($1, $2, $3, $4, $5, $6, $7) '
|| quote_ident(col);
EXECUTE sql USING tab, col, sinfo.ext,
sinfo.sfx * factor, sinfo.sfy * factor,
-----------------------------------------------------------------------
Summary of changes:
ci/berrie64/configs.sh | 2 +-
postgis/postgis.sql.in | 79 +++++++++++++++++++++++++--
raster/rt_pg/rtpostgis.sql.in | 122 +++++++++++++++++++++---------------------
3 files changed, 137 insertions(+), 66 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list