Project

General

Profile

« Previous | Next » 

Revision 13807

schemas/util.sql: bounding_box(): return postgis.geometry instead of postgis.box2d because box2d is not directly used in postgis functions

View differences:

util.sql
737 737
-- Name: bounding_box(range, range); Type: FUNCTION; Schema: util; Owner: -
738 738
--
739 739

  
740
CREATE FUNCTION bounding_box(latitude_range_deg range, longitude_range_deg range) RETURNS postgis.box2d
740
CREATE FUNCTION bounding_box(latitude_range_deg range, longitude_range_deg range) RETURNS postgis.geometry
741 741
    LANGUAGE sql IMMUTABLE
742 742
    SET search_path TO postgis
743 743
    AS $_$
744 744
SELECT st_makebox2d(
745 745
  /*pointLowLeft=*/st_point(/*x_lon=*/$2.lower, /*y_lat=*/$1.lower)
746 746
, /*pointUpRight=*/st_point(/*x_lon=*/$2.upper, /*y_lat=*/$1.upper)
747
)
747
)::geometry
748 748
$_$;
749 749

  
750 750

  

Also available in: Unified diff