Revision 13891
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/util.sql | ||
---|---|---|
3040 | 3040 |
-- Name: point(geocoord); Type: FUNCTION; Schema: util; Owner: - |
3041 | 3041 |
-- |
3042 | 3042 |
|
3043 |
CREATE FUNCTION point(geocoord geocoord) RETURNS postgis.geography
|
|
3043 |
CREATE FUNCTION point(geocoord geocoord) RETURNS postgis.geometry
|
|
3044 | 3044 |
LANGUAGE sql IMMUTABLE |
3045 | 3045 |
SET client_min_messages TO 'warning' |
3046 | 3046 |
AS $_$ |
3047 | 3047 |
SELECT postgis.st_setsrid(postgis.st_point( |
3048 | 3048 |
/*x_lon=*/$1.longitude_deg, /*y_lat=*/$1.latitude_deg), |
3049 |
/*WGS84*/4326)::postgis.geography
|
|
3049 |
/*WGS84*/4326) |
|
3050 | 3050 |
$_$; |
3051 | 3051 |
|
3052 | 3052 |
|
Also available in: Unified diff
schemas/util.sql: point(): return geometry instead of geography to support using points with geometry arithmetic