Changeset 4832

Show
Ignore:
Timestamp:
11/16/09 10:46:38 (2 years ago)
Author:
pramsey
Message:

Add doco and regression tests for ST_MakeEnvelope() (#199)

Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/doc/reference_constructor.xml

    r4817 r4832  
    10941094                        <title>See Also</title> 
    10951095                        <para><xref linkend="ST_AsEWKT" />, <xref linkend="ST_AsText" />, <xref linkend="ST_GeomFromText" />, <xref linkend="ST_MakePoint" /></para> 
     1096                </refsection> 
     1097        </refentry> 
     1098 
     1099 
     1100        <refentry id="ST_MakeEnvelope"> 
     1101                <refnamediv> 
     1102                <refname>ST_MakeEnvelope</refname> 
     1103 
     1104                <refpurpose>Creates a rectangular Polygon formed from the given minimums and maximums. Input 
     1105                        values must be in SRS specified by the SRID.</refpurpose> 
     1106                </refnamediv> 
     1107 
     1108                <refsynopsisdiv> 
     1109                <funcsynopsis> 
     1110                  <funcprototype> 
     1111                        <funcdef>geometry <function>ST_MakeEnvelope</function></funcdef> 
     1112                        <paramdef><type>double precision</type> <parameter>xmin</parameter></paramdef> 
     1113                        <paramdef><type>double precision</type> <parameter>ymin</parameter></paramdef> 
     1114                        <paramdef><type>double precision</type> <parameter>xmax</parameter></paramdef> 
     1115                        <paramdef><type>double precision</type> <parameter>ymax</parameter></paramdef> 
     1116                        <paramdef><type>integer </type> <parameter>srid</parameter></paramdef> 
     1117                  </funcprototype> 
     1118                </funcsynopsis> 
     1119                </refsynopsisdiv> 
     1120 
     1121                <refsection> 
     1122                        <title>Description</title> 
     1123 
     1124                        <para>Creates a rectangular Polygon formed from the minima and maxima. by the given shell. Input 
     1125                                values must be in SRS specified by the SRID.</para> 
     1126 
     1127                </refsection> 
     1128 
     1129                <refsection> 
     1130                <title>Example: Building an bounding box polygon</title> 
     1131                 <programlisting> 
     1132SELECT ST_AsText(ST_MakePolygon(10, 10, 11, 11, 4326)); 
     1133 
     1134st_asewkt 
     1135----------- 
     1136POLYGON((10 10, 10 11, 11 11, 11 10, 10 10)) 
     1137                          </programlisting> 
     1138                </refsection> 
     1139                <refsection> 
     1140                        <title>See Also</title> 
     1141                        <para><xref linkend="ST_MakePoint" />, <xref linkend="ST_MakeLine" />, <xref linkend="ST_MakePolygon" /></para> 
    10961142                </refsection> 
    10971143        </refentry> 
  • trunk/regress/regress_expected

    r4789 r4832  
    196196150|SRID=6;GEOMETRYCOLLECTION(POLYGON((0 0,1 0,1 1,0 1,0 0))) 
    197197150_|SRID=6;GEOMETRYCOLLECTION(POLYGON((0 0,1 0,1 1,0 1,0 0))) 
     198151|0103000020E61000000100000005000000000000000000000000000000000000000000000000000000000000000000F03F000000000000F03F000000000000F03F000000000000F03F000000000000000000000000000000000000000000000000 
     199152|4326 
  • trunk/regress/regress.sql

    r4763 r4832  
    275275select '150_', asewkt(force_collection(setsrid('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'::geometry, 6))); 
    276276 
     277select '151', ST_MakeEnvelope(0, 0, 1, 1, 4326); 
     278select '152', ST_SRID(ST_MakeEnvelope(0, 0, 1, 1, 4326)); 
     279 
     280 
    277281-- Drop test table 
    278282DROP table test;