]> granicus.if.org Git - postgis/commitdiff
change ST_AsSVG to use default args and support named args. Also correct misstatemen...
authorRegina Obe <lr@pcorp.us>
Fri, 30 Dec 2011 08:48:50 +0000 (08:48 +0000)
committerRegina Obe <lr@pcorp.us>
Fri, 30 Dec 2011 08:48:50 +0000 (08:48 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8617 b70326c6-7e19-0410-871a-916f4a2858ee

doc/reference_output.xml
doc/reference_raster.xml
postgis/geography.sql.in.c
postgis/postgis.sql.in.c
postgis/postgis_drop.sql.in.c

index 933be8685c203d76e842fe2eac403f4f606c3f1e..f73a25858a5c970a330c08d750b27110e8c0a384 100644 (file)
@@ -817,31 +817,13 @@ SELECT ST_AsGML(3, ST_GeomFromEWKT('POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0
                <funcsynopsis>
                        <funcprototype>
                                <funcdef>text <function>ST_AsSVG</function></funcdef>
-                               <paramdef><type>geometry </type> <parameter>g1</parameter></paramdef>
-                       </funcprototype>
-                       <funcprototype>
-                               <funcdef>text <function>ST_AsSVG</function></funcdef>
-                               <paramdef><type>geography </type> <parameter>g1</parameter></paramdef>
-                       </funcprototype>
-                       <funcprototype>
-                               <funcdef>text <function>ST_AsSVG</function></funcdef>
-                               <paramdef><type>geometry </type> <parameter>g1</parameter></paramdef>
-                               <paramdef><type>integer </type> <parameter>rel</parameter></paramdef>
-                       </funcprototype>
-                       <funcprototype>
-                               <funcdef>text <function>ST_AsSVG</function></funcdef>
-                               <paramdef><type>geography </type> <parameter>g1</parameter></paramdef>
-                               <paramdef><type>integer </type> <parameter>rel</parameter></paramdef>
+                               <paramdef><type>geometry </type> <parameter>geom</parameter></paramdef>
+                               <paramdef choice='opt'><type>integer </type> <parameter>rel=0</parameter></paramdef>
+                               <paramdef choice='opt'><type>integer </type> <parameter>maxdecimaldigits=15</parameter></paramdef>
                        </funcprototype>
                        <funcprototype>
                                <funcdef>text <function>ST_AsSVG</function></funcdef>
-                               <paramdef><type>geometry </type> <parameter>g1</parameter></paramdef>
-                               <paramdef><type>integer </type> <parameter>rel</parameter></paramdef>
-                               <paramdef><type>integer </type> <parameter>maxdecimaldigits</parameter></paramdef>
-                       </funcprototype>
-                       <funcprototype>
-                               <funcdef>text <function>ST_AsSVG</function></funcdef>
-                               <paramdef><type>geography </type> <parameter>g1</parameter></paramdef>
+                               <paramdef><type>geography </type> <parameter>geog</parameter></paramdef>
                                <paramdef><type>integer </type> <parameter>rel</parameter></paramdef>
                                <paramdef><type>integer </type> <parameter>maxdecimaldigits</parameter></paramdef>
                        </funcprototype>
@@ -864,6 +846,7 @@ SELECT ST_AsGML(3, ST_GeomFromEWKT('POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0
                  <para>Availability: 1.2.2. Availability: 1.4.0  Changed in PostGIS 1.4.0 to include L command in absolute path to conform to <ulink
                        url="http://www.w3.org/TR/SVG/paths.html#PathDataBNF">http://www.w3.org/TR/SVG/paths.html#PathDataBNF</ulink></para>
                </note>
+               <para>Changed: 2.0.0 to use default args and support named args</para>
          </refsection>
 
          <refsection>
index e8193a5467dfc97b3c137f96ac0dc43acd863748..88c8b8c71ae40d3206903c3745249160a10f0af9 100644 (file)
@@ -5334,7 +5334,7 @@ FROM dummy_rast;
                <refentry id="RT_ST_HillShade">
                        <refnamediv>
                                <refname>ST_HillShade</refname>
-                               <refpurpose>Returns the hypothetical illumination of a raster band using azimuth, altitude, brightness, and elevation scale inputs</refpurpose>
+                               <refpurpose>Returns the hypothetical illumination of a raster band using provided azimuth, altitude, brightness, and elevation scale inputs.  Useful for visualizing terrain.</refpurpose>
                        </refnamediv>
                        <refsynopsisdiv>
                                <funcsynopsis>
index 5df8ab475345e7f6b1ef2ddbc99d54a1b2534c43..37956b006c6eb0a87c05bd2f43abef4a8fce9438 100644 (file)
@@ -385,20 +385,10 @@ CREATE OPERATOR CLASS btree_geography_ops
 -- SVG OUTPUT
 --
 
--- ST_AsSVG(geography, precision, rel)
-CREATE OR REPLACE FUNCTION ST_AsSVG(geography,int4,int4)
-       RETURNS text
-       AS 'MODULE_PATHNAME','geography_as_svg'
-       LANGUAGE 'C' IMMUTABLE STRICT;
-
--- ST_AsSVG(geography, precision) / rel=0
-CREATE OR REPLACE FUNCTION ST_AsSVG(geography,int4)
-       RETURNS text
-       AS 'MODULE_PATHNAME','geography_as_svg'
-       LANGUAGE 'C' IMMUTABLE STRICT;
-
--- ST_AsSVG(geography) / precision=15, rel=0
-CREATE OR REPLACE FUNCTION ST_AsSVG(geography)
+-- ST_AsSVG(geography, rel, precision)
+-- rel int4 DEFAULT 0, maxdecimaldigits int4 DEFAULT 15
+-- Changed 2.0.0 to use default args and named args
+CREATE OR REPLACE FUNCTION ST_AsSVG(geog geography,rel int4 DEFAULT 0,maxdecimaldigits int4 DEFAULT 15)
        RETURNS text
        AS 'MODULE_PATHNAME','geography_as_svg'
        LANGUAGE 'C' IMMUTABLE STRICT;
@@ -410,7 +400,6 @@ CREATE OR REPLACE FUNCTION ST_AsSVG(text)
        $$ SELECT ST_AsSVG($1::geometry);  $$
        LANGUAGE 'SQL' IMMUTABLE STRICT;
 
-
 --
 -- GML OUTPUT
 --
index 196262107c33b80da52e93568150e8bf99ebf058..1c7c211c517a12fb58e6fcf28df732d988c3ee29 100644 (file)
@@ -3145,19 +3145,8 @@ CREATE OR REPLACE FUNCTION ST_GeomFromGeoJson(text)
 -- SVG OUTPUT\r
 -----------------------------------------------------------------------\r
 -- Availability: 1.2.2\r
-CREATE OR REPLACE FUNCTION ST_AsSVG(geometry,int4,int4)\r
-       RETURNS TEXT\r
-       AS 'MODULE_PATHNAME','LWGEOM_asSVG'\r
-       LANGUAGE 'C' IMMUTABLE STRICT;\r
-\r
--- Availability: 1.2.2\r
-CREATE OR REPLACE FUNCTION ST_AsSVG(geometry,int4)\r
-       RETURNS TEXT\r
-       AS 'MODULE_PATHNAME','LWGEOM_asSVG'\r
-       LANGUAGE 'C' IMMUTABLE STRICT;\r
-\r
--- Availability: 1.2.2\r
-CREATE OR REPLACE FUNCTION ST_AsSVG(geometry)\r
+-- Changed: 2.0.0 changed to use default args and allow calling by named args\r
+CREATE OR REPLACE FUNCTION ST_AsSVG(geom geometry,rel int4 DEFAULT 0,maxdecimaldigits int4 DEFAULT 15)\r
        RETURNS TEXT\r
        AS 'MODULE_PATHNAME','LWGEOM_asSVG'\r
        LANGUAGE 'C' IMMUTABLE STRICT;\r
index 02f19357b3e577af4f9854fd2321642c84df4e14..9013fa055fafa91fae9621199437ebf35ab48966 100644 (file)
@@ -28,6 +28,10 @@ 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_assvg(geometry); -- changed to use default args
+DROP FUNCTION IF EXISTS st_assvg(geometry,int4); -- changed to use default args
+DROP FUNCTION IF EXISTS st_assvg(geography); -- changed to use default args
+DROP FUNCTION IF EXISTS st_assvg(geography,int4); -- changed to use default args
 DROP FUNCTION IF EXISTS st_box2d_overleft(box2d, box2d);
 DROP FUNCTION IF EXISTS st_box2d_overright(box2d, box2d);
 DROP FUNCTION IF EXISTS st_box2d_left(box2d, box2d);