</refsection>
</refentry>
+
+ <refentry id="ST_MakeEnvelope">
+ <refnamediv>
+ <refname>ST_MakeEnvelope</refname>
+
+ <refpurpose>Creates a rectangular Polygon formed from the given minimums and maximums. Input
+ values must be in SRS specified by the SRID.</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>geometry <function>ST_MakeEnvelope</function></funcdef>
+ <paramdef><type>double precision</type> <parameter>xmin</parameter></paramdef>
+ <paramdef><type>double precision</type> <parameter>ymin</parameter></paramdef>
+ <paramdef><type>double precision</type> <parameter>xmax</parameter></paramdef>
+ <paramdef><type>double precision</type> <parameter>ymax</parameter></paramdef>
+ <paramdef><type>integer </type> <parameter>srid</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsection>
+ <title>Description</title>
+
+ <para>Creates a rectangular Polygon formed from the minima and maxima. by the given shell. Input
+ values must be in SRS specified by the SRID.</para>
+
+ </refsection>
+
+ <refsection>
+ <title>Example: Building an bounding box polygon</title>
+ <programlisting>
+SELECT ST_AsText(ST_MakePolygon(10, 10, 11, 11, 4326));
+
+st_asewkt
+-----------
+POLYGON((10 10, 10 11, 11 11, 11 10, 10 10))
+ </programlisting>
+ </refsection>
+ <refsection>
+ <title>See Also</title>
+ <para><xref linkend="ST_MakePoint" />, <xref linkend="ST_MakeLine" />, <xref linkend="ST_MakePolygon" /></para>
+ </refsection>
+ </refentry>
+
<refentry id="ST_MakePolygon">
<refnamediv>
<refname>ST_MakePolygon</refname>
select '150', ST_asewkt(ST_force_collection(ST_setsrid('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'::geometry, 6)));
select '150_', asewkt(force_collection(setsrid('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'::geometry, 6)));
+select '151', ST_MakeEnvelope(0, 0, 1, 1, 4326);
+select '152', ST_SRID(ST_MakeEnvelope(0, 0, 1, 1, 4326));
+
+
-- Drop test table
DROP table test;
149|GEOMETRYCOLLECTION EMPTY
150|SRID=6;GEOMETRYCOLLECTION(POLYGON((0 0,1 0,1 1,0 1,0 0)))
150_|SRID=6;GEOMETRYCOLLECTION(POLYGON((0 0,1 0,1 1,0 1,0 0)))
+151|0103000020E61000000100000005000000000000000000000000000000000000000000000000000000000000000000F03F000000000000F03F000000000000F03F000000000000F03F000000000000000000000000000000000000000000000000
+152|4326