]> granicus.if.org Git - postgis/commitdiff
#961- reduce number of functions - Get rid of st_area(geography) and change st_area...
authorRegina Obe <lr@pcorp.us>
Tue, 31 May 2011 01:29:19 +0000 (01:29 +0000)
committerRegina Obe <lr@pcorp.us>
Tue, 31 May 2011 01:29:19 +0000 (01:29 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@7299 b70326c6-7e19-0410-871a-916f4a2858ee

doc/reference_measure.xml
postgis/geography.sql.in.c
postgis/postgis_drop.sql.in.c

index b68b58cbc095ccbbd82b32a44b840ab997940a30..40ed18241306f8bd076a5d678f8071da8fd9679c 100644 (file)
@@ -643,12 +643,7 @@ SELECT ST_AsEWKT(ST_3DShortestLine(line,pt)) AS shl3d_line_pt,
                        <funcprototype>
                          <funcdef>float <function>ST_Area</function></funcdef>
                                <paramdef><type>geography </type><parameter>g1</parameter></paramdef>
-                       </funcprototype>
-                       
-                       <funcprototype>
-                         <funcdef>float <function>ST_Area</function></funcdef>
-                               <paramdef><type>geography </type><parameter>g1</parameter></paramdef>
-                               <paramdef><type>boolean </type><parameter>use_spheroid</parameter></paramdef>
+                               <paramdef choice='opt'><type>boolean </type><parameter>use_spheroid=true</parameter></paramdef>
                        </funcprototype>
                  </funcsynopsis>
                </refsynopsisdiv>
index ca08359a84d2d6c16cf682b29ddbbb5d94686a66..d5cd5484a5fdb398b9bb8594eb1ce1010046d37e 100644 (file)
@@ -624,19 +624,12 @@ CREATE OR REPLACE FUNCTION ST_DWithin(text, text, float8)
        LANGUAGE 'SQL' IMMUTABLE;
 
 -- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_Area(geography, boolean)
+CREATE OR REPLACE FUNCTION ST_Area(geog geography, use_spheroid boolean DEFAULT true)
        RETURNS float8
        AS 'MODULE_PATHNAME','geography_area'
        LANGUAGE 'C' IMMUTABLE STRICT
        COST 100;
 
--- Currently defaulting to spheroid calculations
--- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION ST_Area(geography)
-       RETURNS float8
-       AS 'SELECT ST_Area($1, true)'
-       LANGUAGE 'SQL' IMMUTABLE STRICT;
-
 -- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
 -- TODO Remove in 2.0
 CREATE OR REPLACE FUNCTION ST_Area(text)
index be60d483768e9c94536b00109b08916f976fc679..bb6ff97536fc3acc438817fa82c6cd80f459498c 100644 (file)
@@ -14,6 +14,7 @@ DROP FUNCTION IF EXISTS box2d_contained(box2d, box2d);
 DROP FUNCTION IF EXISTS box2d_overlap(box2d, box2d);
 DROP FUNCTION IF EXISTS box2d_same(box2d, box2d);
 DROP FUNCTION IF EXISTS box2d_intersects(box2d, box2d);
+DROP FUNCTION IF EXISTS st_area(geography); -- this one changed to use default parameters
 DROP FUNCTION IF EXISTS st_asx3d(geometry); -- this one changed to use default parameters so full function deals with it
 DROP FUNCTION IF EXISTS st_box2d_overleft(box2d, box2d);
 DROP FUNCTION IF EXISTS st_box2d_overright(box2d, box2d);