Commit c212442d authored by Paul Ramsey's avatar Paul Ramsey

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


git-svn-id: http://svn.osgeo.org/postgis/trunk@4832 b70326c6-7e19-0410-871a-916f4a2858ee
parent fb6e546c
......@@ -1096,6 +1096,52 @@ LINESTRING(1 2 3,3 4 5,6 6 6)
</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>
......
......@@ -274,5 +274,9 @@ select '149', ST_astext(segmentize('GEOMETRYCOLLECTION EMPTY', 0.5));
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;
......@@ -195,3 +195,5 @@ HINT: "MULTIPOINT(1 1, 2 2" <-- parse error at position 19 within geometry
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment