Revision 13887
Added by Aaron Marcuse-Kubitza over 10 years ago
util.sql | ||
---|---|---|
740 | 740 |
CREATE FUNCTION bounding_box(latitude_range_deg range, longitude_range_deg range) RETURNS postgis.geography |
741 | 741 |
LANGUAGE sql IMMUTABLE |
742 | 742 |
AS $_$ |
743 |
/* don't use st_makebox2d() because it doesn't support geocoordinate wraparound |
|
744 |
(it is not SRID-aware) */ |
|
745 |
SELECT postgis.st_makeenvelope( |
|
746 |
/*xmin=*/$2.lower, /*ymin=*/$1.lower |
|
747 |
, /*xmax=*/$2.upper, /*ymax=*/$1.upper |
|
748 |
, /*WGS84*/4326 |
|
749 |
)::postgis.geography |
|
743 |
SELECT util.bounding_box__no_dateline($1, $2)::postgis.geography |
|
750 | 744 |
$_$; |
751 | 745 |
|
752 | 746 |
|
Also available in: Unified diff
schemas/util.sql: bounding_box(): use bounding_box__no_dateline() to construct the postgis.geometry object