From f6febdd12b5811528b6992ace463e5c209eee54d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Fri, 14 Apr 2017 14:14:08 +0200 Subject: [PATCH] Add the geometry(pcpach) function back For backward-compatibility reasons this commit adds back the `geometry(pcpatch)` function that was removed with 7da35f0. This function is just an alias to `PC_Envelope(pcpatch)`. --- pgsql_postgis/pointcloud_postgis--1.0.sql | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pgsql_postgis/pointcloud_postgis--1.0.sql b/pgsql_postgis/pointcloud_postgis--1.0.sql index ea96725..34bd5fd 100644 --- a/pgsql_postgis/pointcloud_postgis--1.0.sql +++ b/pgsql_postgis/pointcloud_postgis--1.0.sql @@ -23,8 +23,16 @@ CREATE OR REPLACE FUNCTION PC_Envelope(pcpatch) $$ LANGUAGE 'sql'; +CREATE OR REPLACE FUNCTION geometry(pcpatch) + RETURNS geometry AS + $$ + SELECT PC_Envelope($1) + $$ + LANGUAGE 'sql'; + CREATE CAST (pcpatch AS geometry) WITH FUNCTION PC_Envelope(pcpatch); + ----------------------------------------------------------------------------- -- Cast from pcpoint to point --