[SCM] PostGIS branch master updated. 3.6.0rc2-153-gc33f545a1
git at osgeo.org
git at osgeo.org
Wed Oct 22 13:38:33 PDT 2025
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".
The branch, master has been updated
via c33f545a1feffd88ab6f8fdc34536e1b8ede9ed1 (commit)
from 19e25a659e825484fcd8a013b5364a2621ae46b5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c33f545a1feffd88ab6f8fdc34536e1b8ede9ed1
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Wed Oct 22 13:38:18 2025 -0700
Add ST_MMin and ST_MMax functions to match up to the other
XYZ variants. Closes #2858.
diff --git a/doc/reference_accessor.xml b/doc/reference_accessor.xml
index ac5864537..b75f26317 100644
--- a/doc/reference_accessor.xml
+++ b/doc/reference_accessor.xml
@@ -906,10 +906,10 @@ FROM (
The exterior ring (shell) has index 0. The interior rings (holes) have indices of 1 and higher.
</para>
- <note>This only works for POLYGON geometries, not MULTIPOLYGONs.
+ <note><para>This only works for POLYGON geometries, not MULTIPOLYGONs.
Use <xref linkend="ST_Dump"/> to extract polygon elements from polygonal geometries:
<code>ST_DumpRings( (ST_Dump(geom)).geom )</code>
- </note>
+ </para></note>
<para role="availability" conformance="1.1.3.">Availability: PostGIS 1.1.3. Requires PostgreSQL 7.3 or higher.</para>
<para>&Z_support;</para>
@@ -921,7 +921,7 @@ FROM (
<para>Extracting all rings as polygons.</para>
<programlisting>SELECT polyTable.field1, polyTable.field1,
(ST_DumpRings(polyTable.geom)).geom As geom
-FROM polyTable;
+FROM polyTable
</programlisting>
<para>Extracting shell and holes from a polygon.</para>
<programlisting>SELECT path, ST_AsText(geom) As geom
diff --git a/doc/reference_bbox.xml b/doc/reference_bbox.xml
index 46bfcc698..797c36f3d 100644
--- a/doc/reference_bbox.xml
+++ b/doc/reference_bbox.xml
@@ -1,45 +1,45 @@
<!-- Converted by db4-upgrade version 1.1 -->
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="BBox_Functions">
- <title>Bounding Box Functions</title><info>
- <abstract>
- <para>These functions produce or operate on bounding boxes.
- They can also provide and accept geometry values, by using automatic or explicit casts.
- </para>
- <para>See also <xref linkend="PostGIS_BoxFunctions"/>.</para>
- </abstract>
+ <title>Bounding Box Functions</title><info>
+ <abstract>
+ <para>These functions produce or operate on bounding boxes.
+ They can also provide and accept geometry values, by using automatic or explicit casts.
+ </para>
+ <para>See also <xref linkend="PostGIS_BoxFunctions"/>.</para>
+ </abstract>
</info>
- <refentry xml:id="Box2D">
- <refnamediv>
- <refname>Box2D</refname>
+ <refentry xml:id="Box2D">
+ <refnamediv>
+ <refname>Box2D</refname>
- <refpurpose>Returns a BOX2D representing the 2D extent of a geometry.</refpurpose>
- </refnamediv>
+ <refpurpose>Returns a BOX2D representing the 2D extent of a geometry.</refpurpose>
+ </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcprototype>
- <funcdef>box2d <function>Box2D</function></funcdef>
- <paramdef><type>geometry </type> <parameter>geom</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>box2d <function>Box2D</function></funcdef>
+ <paramdef><type>geometry </type> <parameter>geom</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
- <refsection>
- <title>Description</title>
+ <refsection>
+ <title>Description</title>
- <para>Returns a <xref linkend="box2d_type"/> representing the 2D extent of the geometry.</para>
+ <para>Returns a <xref linkend="box2d_type"/> representing the 2D extent of the geometry.</para>
- <para role="enhanced" conformance="2.0.0">Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced.</para>
- <para>&curve_support;</para>
- <para>&P_support;</para>
- <para>&T_support;</para>
- </refsection>
+ <para role="enhanced" conformance="2.0.0">Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced.</para>
+ <para>&curve_support;</para>
+ <para>&P_support;</para>
+ <para>&T_support;</para>
+ </refsection>
- <refsection>
- <title>Examples</title>
+ <refsection>
+ <title>Examples</title>
<programlisting>SELECT Box2D(ST_GeomFromText('LINESTRING(1 2, 3 4, 5 6)'));
@@ -54,46 +54,46 @@ box2d
--------
BOX(220186.984375 150406,220288.25 150506.140625)
</programlisting>
- </refsection>
+ </refsection>
- <!-- Optionally add a "See Also" section -->
- <refsection>
- <title>See Also</title>
+ <!-- Optionally add a "See Also" section -->
+ <refsection>
+ <title>See Also</title>
- <para><xref linkend="Box3D"/>, <xref linkend="ST_GeomFromText"/></para>
- </refsection>
- </refentry>
+ <para><xref linkend="Box3D"/>, <xref linkend="ST_GeomFromText"/></para>
+ </refsection>
+ </refentry>
- <refentry xml:id="Box3D">
- <refnamediv>
- <refname>Box3D</refname>
+ <refentry xml:id="Box3D">
+ <refnamediv>
+ <refname>Box3D</refname>
- <refpurpose>Returns a BOX3D representing the 3D extent of a geometry.</refpurpose>
- </refnamediv>
+ <refpurpose>Returns a BOX3D representing the 3D extent of a geometry.</refpurpose>
+ </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcprototype>
- <funcdef>box3d <function>Box3D</function></funcdef>
- <paramdef><type>geometry </type> <parameter>geom</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>box3d <function>Box3D</function></funcdef>
+ <paramdef><type>geometry </type> <parameter>geom</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
- <refsection>
- <title>Description</title>
+ <refsection>
+ <title>Description</title>
- <para>Returns a <xref linkend="box3d_type"/> representing the 3D extent of the geometry.</para>
- <para role="enhanced" conformance="2.0.0">Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced.</para>
- <para>&curve_support;</para>
- <para>&P_support;</para>
- <para>&T_support;</para>
- <para>&Z_support;</para>
- </refsection>
+ <para>Returns a <xref linkend="box3d_type"/> representing the 3D extent of the geometry.</para>
+ <para role="enhanced" conformance="2.0.0">Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced.</para>
+ <para>&curve_support;</para>
+ <para>&P_support;</para>
+ <para>&T_support;</para>
+ <para>&Z_support;</para>
+ </refsection>
- <refsection>
- <title>Examples</title>
+ <refsection>
+ <title>Examples</title>
<programlisting>SELECT Box3D(ST_GeomFromEWKT('LINESTRING(1 2 3, 3 4 5, 5 6 5)'));
@@ -108,75 +108,75 @@ Box3d
--------
BOX3D(220227 150406 1,220268 150415 1)
</programlisting>
- </refsection>
+ </refsection>
- <!-- Optionally add a "See Also" section -->
- <refsection>
- <title>See Also</title>
+ <!-- Optionally add a "See Also" section -->
+ <refsection>
+ <title>See Also</title>
- <para><xref linkend="Box2D"/>, <xref linkend="ST_GeomFromEWKT"/></para>
- </refsection>
- </refentry>
+ <para><xref linkend="Box2D"/>, <xref linkend="ST_GeomFromEWKT"/></para>
+ </refsection>
+ </refentry>
- <refentry xml:id="ST_EstimatedExtent">
- <refnamediv>
- <refname>ST_EstimatedExtent</refname>
+ <refentry xml:id="ST_EstimatedExtent">
+ <refnamediv>
+ <refname>ST_EstimatedExtent</refname>
- <refpurpose>Returns the estimated extent of a spatial table.</refpurpose>
- </refnamediv>
+ <refpurpose>Returns the estimated extent of a spatial table.</refpurpose>
+ </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcprototype>
- <funcdef>box2d <function>ST_EstimatedExtent</function></funcdef>
- <paramdef><type>text </type> <parameter>schema_name</parameter></paramdef>
- <paramdef><type>text </type> <parameter>table_name</parameter></paramdef>
- <paramdef><type>text </type> <parameter>geocolumn_name</parameter></paramdef>
- <paramdef><type>boolean </type> <parameter>parent_only</parameter></paramdef>
- </funcprototype>
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>box2d <function>ST_EstimatedExtent</function></funcdef>
+ <paramdef><type>text </type> <parameter>schema_name</parameter></paramdef>
+ <paramdef><type>text </type> <parameter>table_name</parameter></paramdef>
+ <paramdef><type>text </type> <parameter>geocolumn_name</parameter></paramdef>
+ <paramdef><type>boolean </type> <parameter>parent_only</parameter></paramdef>
+ </funcprototype>
- <funcprototype>
- <funcdef>box2d <function>ST_EstimatedExtent</function></funcdef>
- <paramdef><type>text </type> <parameter>schema_name</parameter></paramdef>
- <paramdef><type>text </type> <parameter>table_name</parameter></paramdef>
- <paramdef><type>text </type> <parameter>geocolumn_name</parameter></paramdef>
- </funcprototype>
+ <funcprototype>
+ <funcdef>box2d <function>ST_EstimatedExtent</function></funcdef>
+ <paramdef><type>text </type> <parameter>schema_name</parameter></paramdef>
+ <paramdef><type>text </type> <parameter>table_name</parameter></paramdef>
+ <paramdef><type>text </type> <parameter>geocolumn_name</parameter></paramdef>
+ </funcprototype>
- <funcprototype>
- <funcdef>box2d <function>ST_EstimatedExtent</function></funcdef>
- <paramdef><type>text </type> <parameter>table_name</parameter></paramdef>
- <paramdef><type>text </type> <parameter>geocolumn_name</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
+ <funcprototype>
+ <funcdef>box2d <function>ST_EstimatedExtent</function></funcdef>
+ <paramdef><type>text </type> <parameter>table_name</parameter></paramdef>
+ <paramdef><type>text </type> <parameter>geocolumn_name</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
- <refsection>
- <title>Description</title>
+ <refsection>
+ <title>Description</title>
- <para>Returns the estimated extent of a spatial table as a <xref linkend="box2d_type"/>.
- The current schema is used if not specified.
- The estimated extent is taken from the geometry column's statistics.
+ <para>Returns the estimated extent of a spatial table as a <xref linkend="box2d_type"/>.
+ The current schema is used if not specified.
+ The estimated extent is taken from the geometry column's statistics.
This is usually much faster than computing the exact extent of the table
using <xref linkend="ST_Extent"/> or <xref linkend="ST_3DExtent"/>.
</para>
<para>
The default behavior is to also use statistics collected from child tables (tables
- with INHERITS) if available. If <varname>parent_only</varname> is set to TRUE, only
- statistics for the given table are used and child tables are ignored.
- </para>
+ with INHERITS) if available. If <varname>parent_only</varname> is set to TRUE, only
+ statistics for the given table are used and child tables are ignored.
+ </para>
- <para>For PostgreSQL >= 8.0.0 statistics are gathered by VACUUM
- ANALYZE and the result extent will be about 95% of the actual one.
+ <para>For PostgreSQL >= 8.0.0 statistics are gathered by VACUUM
+ ANALYZE and the result extent will be about 95% of the actual one.
For PostgreSQL < 8.0.0 statistics are gathered by running
- <code>update_geometry_stats()</code> and the result extent is exact.
+ <code>update_geometry_stats()</code> and the result extent is exact.
</para>
<note>
<para>
In the absence of statistics (empty table or no ANALYZE called) this function
returns NULL. Prior to version 1.5.4 an exception was thrown instead.
- </para>
+ </para>
</note>
<note>
@@ -188,201 +188,201 @@ BOX3D(220227 150406 1,220268 150415 1)
<para role="availability" conformance="1.0.0">Availability: 1.0.0</para>
<para role="changed" conformance="2.1.0.">Changed: 2.1.0. Up to 2.0.x this was called ST_Estimated_Extent.</para>
- <para>&curve_support;</para>
- </refsection>
+ <para>&curve_support;</para>
+ </refsection>
- <refsection>
- <title>Examples</title>
+ <refsection>
+ <title>Examples</title>
- <programlisting>SELECT ST_EstimatedExtent('ny', 'edges', 'geom');
+ <programlisting>SELECT ST_EstimatedExtent('ny', 'edges', 'geom');
--result--
BOX(-8877653 4912316,-8010225.5 5589284)
SELECT ST_EstimatedExtent('feature_poly', 'geom');
--result--
BOX(-124.659652709961 24.6830825805664,-67.7798080444336 49.0012092590332)
- </programlisting>
- </refsection>
+ </programlisting>
+ </refsection>
- <!-- Optionally add a "See Also" section -->
- <refsection>
- <title>See Also</title>
+ <!-- Optionally add a "See Also" section -->
+ <refsection>
+ <title>See Also</title>
- <para><xref linkend="ST_Extent"/>, <xref linkend="ST_3DExtent"/></para>
- </refsection>
- </refentry>
+ <para><xref linkend="ST_Extent"/>, <xref linkend="ST_3DExtent"/></para>
+ </refsection>
+ </refentry>
- <refentry xml:id="ST_Expand">
- <refnamediv>
- <refname>ST_Expand</refname>
- <refpurpose>Returns a bounding box expanded from another bounding box or a geometry.</refpurpose>
- </refnamediv>
+ <refentry xml:id="ST_Expand">
+ <refnamediv>
+ <refname>ST_Expand</refname>
+ <refpurpose>Returns a bounding box expanded from another bounding box or a geometry.</refpurpose>
+ </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcprototype>
- <funcdef>geometry <function>ST_Expand</function></funcdef>
- <paramdef><type>geometry </type> <parameter>geom</parameter></paramdef>
- <paramdef><type>float</type> <parameter>units_to_expand</parameter></paramdef>
- </funcprototype>
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>geometry <function>ST_Expand</function></funcdef>
+ <paramdef><type>geometry </type> <parameter>geom</parameter></paramdef>
+ <paramdef><type>float</type> <parameter>units_to_expand</parameter></paramdef>
+ </funcprototype>
- <funcprototype>
- <funcdef>geometry <function>ST_Expand</function></funcdef>
- <paramdef><type>geometry </type> <parameter>geom</parameter></paramdef>
- <paramdef><type>float</type> <parameter>dx</parameter></paramdef>
- <paramdef><type>float</type> <parameter>dy</parameter></paramdef>
- <paramdef choice="opt"><type>float</type> <parameter>dz=0</parameter></paramdef>
- <paramdef choice="opt"><type>float</type> <parameter>dm=0</parameter></paramdef>
- </funcprototype>
+ <funcprototype>
+ <funcdef>geometry <function>ST_Expand</function></funcdef>
+ <paramdef><type>geometry </type> <parameter>geom</parameter></paramdef>
+ <paramdef><type>float</type> <parameter>dx</parameter></paramdef>
+ <paramdef><type>float</type> <parameter>dy</parameter></paramdef>
+ <paramdef choice="opt"><type>float</type> <parameter>dz=0</parameter></paramdef>
+ <paramdef choice="opt"><type>float</type> <parameter>dm=0</parameter></paramdef>
+ </funcprototype>
- <funcprototype>
- <funcdef>box2d <function>ST_Expand</function></funcdef>
- <paramdef><type>box2d </type> <parameter>box</parameter></paramdef>
- <paramdef><type>float</type> <parameter>units_to_expand</parameter></paramdef>
- </funcprototype>
+ <funcprototype>
+ <funcdef>box2d <function>ST_Expand</function></funcdef>
+ <paramdef><type>box2d </type> <parameter>box</parameter></paramdef>
+ <paramdef><type>float</type> <parameter>units_to_expand</parameter></paramdef>
+ </funcprototype>
- <funcprototype>
- <funcdef>box2d <function>ST_Expand</function></funcdef>
- <paramdef><type>box2d </type> <parameter>box</parameter></paramdef>
- <paramdef><type>float</type> <parameter>dx</parameter></paramdef>
- <paramdef><type>float</type> <parameter>dy</parameter></paramdef>
- </funcprototype>
+ <funcprototype>
+ <funcdef>box2d <function>ST_Expand</function></funcdef>
+ <paramdef><type>box2d </type> <parameter>box</parameter></paramdef>
+ <paramdef><type>float</type> <parameter>dx</parameter></paramdef>
+ <paramdef><type>float</type> <parameter>dy</parameter></paramdef>
+ </funcprototype>
- <funcprototype>
- <funcdef>box3d <function>ST_Expand</function></funcdef>
- <paramdef><type>box3d </type> <parameter>box</parameter></paramdef>
- <paramdef><type>float</type> <parameter>units_to_expand</parameter></paramdef>
- </funcprototype>
+ <funcprototype>
+ <funcdef>box3d <function>ST_Expand</function></funcdef>
+ <paramdef><type>box3d </type> <parameter>box</parameter></paramdef>
+ <paramdef><type>float</type> <parameter>units_to_expand</parameter></paramdef>
+ </funcprototype>
- <funcprototype>
- <funcdef>box3d <function>ST_Expand</function></funcdef>
- <paramdef><type>box3d </type> <parameter>box</parameter></paramdef>
- <paramdef><type>float</type> <parameter>dx</parameter></paramdef>
- <paramdef><type>float</type> <parameter>dy</parameter></paramdef>
- <paramdef choice="opt"><type>float</type> <parameter>dz=0</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
+ <funcprototype>
+ <funcdef>box3d <function>ST_Expand</function></funcdef>
+ <paramdef><type>box3d </type> <parameter>box</parameter></paramdef>
+ <paramdef><type>float</type> <parameter>dx</parameter></paramdef>
+ <paramdef><type>float</type> <parameter>dy</parameter></paramdef>
+ <paramdef choice="opt"><type>float</type> <parameter>dz=0</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
- <refsection>
- <title>Description</title>
+ <refsection>
+ <title>Description</title>
- <para>Returns a bounding box expanded from the bounding box of the input,
- either by specifying a single distance with which the box should be expanded on both
- axes, or by specifying an expansion distance for each axis.
+ <para>Returns a bounding box expanded from the bounding box of the input,
+ either by specifying a single distance with which the box should be expanded on both
+ axes, or by specifying an expansion distance for each axis.
- Uses double-precision. Can be used for distance queries, or to add a bounding box
- filter to a query to take advantage of a spatial index.</para>
+ Uses double-precision. Can be used for distance queries, or to add a bounding box
+ filter to a query to take advantage of a spatial index.</para>
- <para>In addition to the version of ST_Expand accepting and returning a geometry, variants
- are provided that accept and return
+ <para>In addition to the version of ST_Expand accepting and returning a geometry, variants
+ are provided that accept and return
<xref linkend="box2d_type"/> and <xref linkend="box3d_type"/> data types.
- </para>
+ </para>
- <para>Distances are in the units of the spatial reference system of the input.</para>
+ <para>Distances are in the units of the spatial reference system of the input.</para>
- <para>ST_Expand is similar to <xref linkend="ST_Buffer"/>,
- except while buffering expands a geometry in all directions,
- ST_Expand expands the bounding box along each axis.</para>
+ <para>ST_Expand is similar to <xref linkend="ST_Buffer"/>,
+ except while buffering expands a geometry in all directions,
+ ST_Expand expands the bounding box along each axis.</para>
- <note>
- <para>Pre version 1.3, ST_Expand was used in conjunction with <xref linkend="ST_Distance"/> to do indexable distance queries. For example,
- <code>geom && ST_Expand('POINT(10 20)', 10) AND ST_Distance(geom, 'POINT(10 20)') < 10</code>.
- This has been replaced by the simpler and more efficient <xref linkend="ST_DWithin"/> function.</para>
- </note>
+ <note>
+ <para>Pre version 1.3, ST_Expand was used in conjunction with <xref linkend="ST_Distance"/> to do indexable distance queries. For example,
+ <code>geom && ST_Expand('POINT(10 20)', 10) AND ST_Distance(geom, 'POINT(10 20)') < 10</code>.
+ This has been replaced by the simpler and more efficient <xref linkend="ST_DWithin"/> function.</para>
+ </note>
<para role="availability" conformance="1.5.0">Availability: 1.5.0 behavior changed to output double precision instead of float4 coordinates.</para>
<para role="enhanced" conformance="2.0.0">Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced.</para>
<para role="enhanced" conformance="2.3.0">Enhanced: 2.3.0 support was added to expand a box by different amounts in different dimensions.</para>
- <para>&P_support;</para>
- <para>&T_support;</para>
+ <para>&P_support;</para>
+ <para>&T_support;</para>
- </refsection>
+ </refsection>
- <refsection>
- <title>Examples</title>
- <note><para>Examples below use US National Atlas Equal Area (SRID=2163) which is a meter projection</para></note>
- <programlisting>
- <!-- TODO: fix results of documentation to reflect new behavior -->
+ <refsection>
+ <title>Examples</title>
+ <note><para>Examples below use US National Atlas Equal Area (SRID=2163) which is a meter projection</para></note>
+ <programlisting>
+ <!-- TODO: fix results of documentation to reflect new behavior -->
--10 meter expanded box around bbox of a linestring
SELECT CAST(ST_Expand(ST_GeomFromText('LINESTRING(2312980 110676,2312923 110701,2312892 110714)', 2163),10) As box2d);
- st_expand
+ st_expand
------------------------------------
BOX(2312882 110666,2312990 110724)
--10 meter expanded 3D box of a 3D box
SELECT ST_Expand(CAST('BOX3D(778783 2951741 1,794875 2970042.61545891 10)' As box3d),10)
- st_expand
+ st_expand
-----------------------------------------------------
BOX3D(778773 2951731 -9,794885 2970052.61545891 20)
--10 meter geometry astext rep of a expand box around a point geometry
SELECT ST_AsEWKT(ST_Expand(ST_GeomFromEWKT('SRID=2163;POINT(2312980 110676)'),10));
- st_asewkt
+ st_asewkt
-------------------------------------------------------------------------------------------------
SRID=2163;POLYGON((2312970 110666,2312970 110686,2312990 110686,2312990 110666,2312970 110666))
- </programlisting>
- </refsection>
+ </programlisting>
+ </refsection>
- <refsection>
- <title>See Also</title>
- <para><xref linkend="ST_Buffer"/>, <xref linkend="ST_DWithin"/>, <xref linkend="ST_SRID"/></para>
- </refsection>
- </refentry>
+ <refsection>
+ <title>See Also</title>
+ <para><xref linkend="ST_Buffer"/>, <xref linkend="ST_DWithin"/>, <xref linkend="ST_SRID"/></para>
+ </refsection>
+ </refentry>
- <refentry xml:id="ST_Extent">
- <refnamediv>
- <refname>ST_Extent</refname>
- <refpurpose>Aggregate function that returns the bounding box of geometries.</refpurpose>
- </refnamediv>
+ <refentry xml:id="ST_Extent">
+ <refnamediv>
+ <refname>ST_Extent</refname>
+ <refpurpose>Aggregate function that returns the bounding box of geometries.</refpurpose>
+ </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcprototype>
- <funcdef>box2d <function>ST_Extent</function></funcdef>
- <paramdef><type>geometry set</type> <parameter>geomfield</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>box2d <function>ST_Extent</function></funcdef>
+ <paramdef><type>geometry set</type> <parameter>geomfield</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
- <refsection>
- <title>Description</title>
+ <refsection>
+ <title>Description</title>
- <para>An aggregate function that returns a <xref linkend="box2d_type"/> bounding box
+ <para>An aggregate function that returns a <xref linkend="box2d_type"/> bounding box
that bounds a set of geometries.
</para>
- <para>The bounding box coordinates are in the spatial reference system of the input geometries.</para>
+ <para>The bounding box coordinates are in the spatial reference system of the input geometries.</para>
- <para>ST_Extent is similar in concept to Oracle Spatial/Locator's SDO_AGGR_MBR.</para>
+ <para>ST_Extent is similar in concept to Oracle Spatial/Locator's SDO_AGGR_MBR.</para>
- <note>
- <para>ST_Extent returns boxes with only X and Y ordinates even with 3D geometries.
+ <note>
+ <para>ST_Extent returns boxes with only X and Y ordinates even with 3D geometries.
To return XYZ ordinates use <xref linkend="ST_3DExtent"/>.</para>
- </note>
+ </note>
- <note>
- <para>The returned <code>box3d</code> value does not include a SRID.
+ <note>
+ <para>The returned <code>box3d</code> value does not include a SRID.
Use <xref linkend="ST_SetSRID"/> to convert it into a geometry with SRID metadata.
The SRID is the same as the input geometries.</para>
- </note>
+ </note>
- <para role="enhanced" conformance="2.0.0">Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced.</para>
- <para>&P_support;</para>
- <para>&T_support;</para>
+ <para role="enhanced" conformance="2.0.0">Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced.</para>
+ <para>&P_support;</para>
+ <para>&T_support;</para>
- </refsection>
+ </refsection>
- <refsection>
- <title>Examples</title>
- <note><para>Examples below use Massachusetts State Plane ft (SRID=2249)</para></note>
- <programlisting>
+ <refsection>
+ <title>Examples</title>
+ <note><para>Examples below use Massachusetts State Plane ft (SRID=2249)</para></note>
+ <programlisting>
SELECT ST_Extent(geom) as bextent FROM sometable;
- st_bextent
+ st_bextent
------------------------------------
BOX(739651.875 2908247.25,794875.8125 2970042.75)
@@ -392,7 +392,7 @@ SELECT ST_Extent(geom) as bextent
FROM sometable
GROUP BY category ORDER BY category;
- bextent | name
+ bextent | name
----------------------------------------------------+----------------
BOX(778783.5625 2951741.25,794875.8125 2970042.75) | A
BOX(751315.8125 2919164.75,765202.6875 2935417.25) | B
@@ -402,226 +402,226 @@ GROUP BY category ORDER BY category;
-- and render the extended text representation of that geometry
SELECT ST_SetSRID(ST_Extent(geom),2249) as bextent FROM sometable;
- bextent
+ bextent
--------------------------------------------------------------------------------
SRID=2249;POLYGON((739651.875 2908247.25,739651.875 2970042.75,794875.8125 2970042.75,
794875.8125 2908247.25,739651.875 2908247.25))
- </programlisting>
- </refsection>
+ </programlisting>
+ </refsection>
- <refsection>
- <title>See Also</title>
- <para>
+ <refsection>
+ <title>See Also</title>
+ <para>
<xref linkend="ST_EstimatedExtent"/>,
<xref linkend="ST_3DExtent"/>,
<xref linkend="ST_SetSRID"/>
- </para>
- </refsection>
- </refentry>
+ </para>
+ </refsection>
+ </refentry>
- <refentry xml:id="ST_3DExtent">
- <refnamediv>
- <refname>ST_3DExtent</refname>
- <refpurpose>Aggregate function that returns the 3D bounding box of geometries.</refpurpose>
- </refnamediv>
+ <refentry xml:id="ST_3DExtent">
+ <refnamediv>
+ <refname>ST_3DExtent</refname>
+ <refpurpose>Aggregate function that returns the 3D bounding box of geometries.</refpurpose>
+ </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcprototype>
- <funcdef>box3d <function>ST_3DExtent</function></funcdef>
- <paramdef><type>geometry set</type> <parameter>geomfield</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>box3d <function>ST_3DExtent</function></funcdef>
+ <paramdef><type>geometry set</type> <parameter>geomfield</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
- <refsection>
- <title>Description</title>
+ <refsection>
+ <title>Description</title>
- <para>An aggregate function that returns a <xref linkend="box3d_type"/> (includes Z ordinate) bounding box
+ <para>An aggregate function that returns a <xref linkend="box3d_type"/> (includes Z ordinate) bounding box
that bounds a set of geometries.
</para>
- <para>The bounding box coordinates are in the spatial reference system of the input geometries.</para>
+ <para>The bounding box coordinates are in the spatial reference system of the input geometries.</para>
- <note>
- <para>The returned <code>box3d</code> value does not include a SRID.
+ <note>
+ <para>The returned <code>box3d</code> value does not include a SRID.
Use <xref linkend="ST_SetSRID"/> to convert it into a geometry with SRID metadata.
The SRID is the same as the input geometries.</para>
- </note>
+ </note>
- <para role="enhanced" conformance="2.0.0">Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced.</para>
- <para role="changed" conformance="2.0.0">Changed: 2.0.0 In prior versions this used to be called ST_Extent3D</para>
- <para>&Z_support;</para>
- <para>&curve_support;</para>
- <para>&P_support;</para>
- <para>&T_support;</para>
- </refsection>
+ <para role="enhanced" conformance="2.0.0">Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced.</para>
+ <para role="changed" conformance="2.0.0">Changed: 2.0.0 In prior versions this used to be called ST_Extent3D</para>
+ <para>&Z_support;</para>
+ <para>&curve_support;</para>
+ <para>&P_support;</para>
+ <para>&T_support;</para>
+ </refsection>
- <refsection>
- <title>Examples</title>
- <programlisting>
+ <refsection>
+ <title>Examples</title>
+ <programlisting>
SELECT ST_3DExtent(foo.geom) As b3extent
FROM (SELECT ST_MakePoint(x,y,z) As geom
- FROM generate_series(1,3) As x
- CROSS JOIN generate_series(1,2) As y
- CROSS JOIN generate_series(0,2) As Z) As foo;
- b3extent
+ FROM generate_series(1,3) As x
+ CROSS JOIN generate_series(1,2) As y
+ CROSS JOIN generate_series(0,2) As Z) As foo;
+ b3extent
--------------------
BOX3D(1 1 0,3 2 2)
--Get the extent of various elevated circular strings
SELECT ST_3DExtent(foo.geom) As b3extent
FROM (SELECT ST_Translate(ST_Force_3DZ(ST_LineToCurve(ST_Buffer(ST_Point(x,y),1))),0,0,z) As geom
- FROM generate_series(1,3) As x
- CROSS JOIN generate_series(1,2) As y
- CROSS JOIN generate_series(0,2) As Z) As foo;
+ FROM generate_series(1,3) As x
+ CROSS JOIN generate_series(1,2) As y
+ CROSS JOIN generate_series(0,2) As Z) As foo;
- b3extent
+ b3extent
--------------------
BOX3D(1 0 0,4 2 2)
- </programlisting>
- </refsection>
+ </programlisting>
+ </refsection>
- <refsection>
- <title>See Also</title>
- <para><xref linkend="ST_Extent"/>, <xref linkend="ST_Force_3DZ"/>, <xref linkend="ST_SetSRID"/></para>
- </refsection>
- </refentry>
+ <refsection>
+ <title>See Also</title>
+ <para><xref linkend="ST_Extent"/>, <xref linkend="ST_Force_3DZ"/>, <xref linkend="ST_SetSRID"/></para>
+ </refsection>
+ </refentry>
- <refentry xml:id="ST_MakeBox2D">
- <refnamediv>
- <refname>ST_MakeBox2D</refname>
+ <refentry xml:id="ST_MakeBox2D">
+ <refnamediv>
+ <refname>ST_MakeBox2D</refname>
- <refpurpose>Creates a BOX2D defined by two 2D point geometries.</refpurpose>
- </refnamediv>
+ <refpurpose>Creates a BOX2D defined by two 2D point geometries.</refpurpose>
+ </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcprototype>
- <funcdef>box2d <function>ST_MakeBox2D</function></funcdef>
- <paramdef><type>geometry </type> <parameter>pointLowLeft</parameter></paramdef>
- <paramdef><type>geometry </type> <parameter>pointUpRight</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>box2d <function>ST_MakeBox2D</function></funcdef>
+ <paramdef><type>geometry </type> <parameter>pointLowLeft</parameter></paramdef>
+ <paramdef><type>geometry </type> <parameter>pointUpRight</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
- <refsection>
- <title>Description</title>
+ <refsection>
+ <title>Description</title>
- <para>Creates a <xref linkend="box2d_type"/> defined by two Point
- geometries. This is useful for doing range queries.</para>
- </refsection>
+ <para>Creates a <xref linkend="box2d_type"/> defined by two Point
+ geometries. This is useful for doing range queries.</para>
+ </refsection>
- <refsection>
- <title>Examples</title>
+ <refsection>
+ <title>Examples</title>
- <programlisting><![CDATA[
+ <programlisting><![CDATA[
--Return all features that fall reside or partly reside in a US national atlas coordinate bounding box
--It is assumed here that the geometries are stored with SRID = 2163 (US National atlas equal area)
SELECT feature_id, feature_name, geom
FROM features
WHERE geom && ST_SetSRID(ST_MakeBox2D(ST_Point(-989502.1875, 528439.5625),
- ST_Point(-987121.375 ,529933.1875)),2163)
+ ST_Point(-987121.375 ,529933.1875)),2163)
]]></programlisting>
- </refsection>
+ </refsection>
- <!-- Optionally add a "See Also" section -->
- <refsection>
- <title>See Also</title>
+ <!-- Optionally add a "See Also" section -->
+ <refsection>
+ <title>See Also</title>
- <para><xref linkend="ST_Point"/>, <xref linkend="ST_SetSRID"/>, <xref linkend="ST_SRID"/></para>
- </refsection>
- </refentry>
+ <para><xref linkend="ST_Point"/>, <xref linkend="ST_SetSRID"/>, <xref linkend="ST_SRID"/></para>
+ </refsection>
+ </refentry>
- <refentry xml:id="ST_3DMakeBox">
- <refnamediv>
- <refname>ST_3DMakeBox</refname>
+ <refentry xml:id="ST_3DMakeBox">
+ <refnamediv>
+ <refname>ST_3DMakeBox</refname>
- <refpurpose>Creates a BOX3D defined by two 3D point geometries.</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcprototype>
- <funcdef>box3d <function>ST_3DMakeBox</function></funcdef>
- <paramdef><type>geometry </type> <parameter>point3DLowLeftBottom</parameter></paramdef>
- <paramdef><type>geometry </type> <parameter>point3DUpRightTop</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
+ <refpurpose>Creates a BOX3D defined by two 3D point geometries.</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>box3d <function>ST_3DMakeBox</function></funcdef>
+ <paramdef><type>geometry </type> <parameter>point3DLowLeftBottom</parameter></paramdef>
+ <paramdef><type>geometry </type> <parameter>point3DUpRightTop</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
- <refsection>
- <title>Description</title>
+ <refsection>
+ <title>Description</title>
- <para>Creates a <xref linkend="box3d_type"/> defined by two 3D Point
- geometries. </para>
+ <para>Creates a <xref linkend="box3d_type"/> defined by two 3D Point
+ geometries. </para>
- <!-- Optionally mention 3D support -->
- <para><inlinemediaobject>
- <imageobject>
- <imagedata fileref="images/check.png"/>
- </imageobject>
- </inlinemediaobject> This function supports 3D and will not drop the z-index.</para>
- <para role="changed" conformance="2.0.0">Changed: 2.0.0 In prior versions this used to be called ST_MakeBox3D</para>
- </refsection>
+ <!-- Optionally mention 3D support -->
+ <para><inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/check.png"/>
+ </imageobject>
+ </inlinemediaobject> This function supports 3D and will not drop the z-index.</para>
+ <para role="changed" conformance="2.0.0">Changed: 2.0.0 In prior versions this used to be called ST_MakeBox3D</para>
+ </refsection>
- <refsection>
- <title>Examples</title>
+ <refsection>
+ <title>Examples</title>
- <programlisting>
+ <programlisting>
SELECT ST_3DMakeBox(ST_MakePoint(-989502.1875, 528439.5625, 10),
- ST_MakePoint(-987121.375 ,529933.1875, 10)) As abb3d
+ ST_MakePoint(-987121.375 ,529933.1875, 10)) As abb3d
--bb3d--
--------
BOX3D(-989502.1875 528439.5625 10,-987121.375 529933.1875 10)
- </programlisting>
- </refsection>
+ </programlisting>
+ </refsection>
- <!-- Optionally add a "See Also" section -->
- <refsection>
- <title>See Also</title>
+ <!-- Optionally add a "See Also" section -->
+ <refsection>
+ <title>See Also</title>
- <para><xref linkend="ST_MakePoint"/>, <xref linkend="ST_SetSRID"/>, <xref linkend="ST_SRID"/></para>
- </refsection>
- </refentry>
+ <para><xref linkend="ST_MakePoint"/>, <xref linkend="ST_SetSRID"/>, <xref linkend="ST_SRID"/></para>
+ </refsection>
+ </refentry>
- <refentry xml:id="ST_XMax">
- <refnamediv>
- <refname>ST_XMax</refname>
+ <refentry xml:id="ST_XMax">
+ <refnamediv>
+ <refname>ST_XMax</refname>
- <refpurpose>Returns the X maxima of a 2D or 3D bounding box or a geometry.</refpurpose>
- </refnamediv>
+ <refpurpose>Returns the X maxima of a 2D or 3D bounding box or a geometry.</refpurpose>
+ </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcprototype>
- <funcdef>float <function>ST_XMax</function></funcdef>
- <paramdef><type>box3d </type> <parameter>aGeomorBox2DorBox3D</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>float <function>ST_XMax</function></funcdef>
+ <paramdef><type>box3d </type> <parameter>aGeomorBox2DorBox3D</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
- <refsection>
- <title>Description</title>
+ <refsection>
+ <title>Description</title>
- <para>Returns the X maxima of a 2D or 3D bounding box or a geometry.</para>
+ <para>Returns the X maxima of a 2D or 3D bounding box or a geometry.</para>
- <note>
- <para>Although this function is only defined for box3d, it also works for box2d and geometry values due to automatic casting.
- However, it will not accept a geometry or box2d text representation, since those do not auto-cast.</para>
- </note>
+ <note>
+ <para>Although this function is only defined for box3d, it also works for box2d and geometry values due to automatic casting.
+ However, it will not accept a geometry or box2d text representation, since those do not auto-cast.</para>
+ </note>
- <para>&Z_support;</para>
- <para>&curve_support;</para>
- </refsection>
+ <para>&Z_support;</para>
+ <para>&curve_support;</para>
+ </refsection>
- <refsection>
- <title>Examples</title>
+ <refsection>
+ <title>Examples</title>
- <programlisting>SELECT ST_XMax('BOX3D(1 2 3, 4 5 6)');
+ <programlisting>SELECT ST_XMax('BOX3D(1 2 3, 4 5 6)');
st_xmax
-------
4
@@ -644,52 +644,52 @@ SELECT ST_XMax(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,2
st_xmax
--------
220288.248780547
- </programlisting>
- </refsection>
+ </programlisting>
+ </refsection>
- <!-- Optionally add a "See Also" section -->
- <refsection>
- <title>See Also</title>
+ <!-- Optionally add a "See Also" section -->
+ <refsection>
+ <title>See Also</title>
- <para><xref linkend="ST_XMin"/>, <xref linkend="ST_YMax"/>, <xref linkend="ST_YMin"/>, <xref linkend="ST_ZMax"/>, <xref linkend="ST_ZMin"/></para>
- </refsection>
- </refentry>
+ <para><xref linkend="ST_XMin"/>, <xref linkend="ST_YMin"/>, <xref linkend="ST_YMax"/>, <xref linkend="ST_ZMin"/>, <xref linkend="ST_ZMax"/>, <xref linkend="ST_MMin"/>, <xref linkend="ST_MMax"/></para>
+ </refsection>
+ </refentry>
- <refentry xml:id="ST_XMin">
- <refnamediv>
- <refname>ST_XMin</refname>
+ <refentry xml:id="ST_XMin">
+ <refnamediv>
+ <refname>ST_XMin</refname>
- <refpurpose>Returns the X minima of a 2D or 3D bounding box or a geometry.</refpurpose>
- </refnamediv>
+ <refpurpose>Returns the X minima of a 2D or 3D bounding box or a geometry.</refpurpose>
+ </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcprototype>
- <funcdef>float <function>ST_XMin</function></funcdef>
- <paramdef><type>box3d </type> <parameter>aGeomorBox2DorBox3D</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>float <function>ST_XMin</function></funcdef>
+ <paramdef><type>box3d </type> <parameter>aGeomorBox2DorBox3D</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
- <refsection>
- <title>Description</title>
+ <refsection>
+ <title>Description</title>
- <para>Returns the X minima of a 2D or 3D bounding box or a geometry.</para>
+ <para>Returns the X minima of a 2D or 3D bounding box or a geometry.</para>
- <note>
- <para>Although this function is only defined for box3d, it also works for box2d and geometry values due to automatic casting.
- However it will not accept a geometry or box2d text representation, since those do not auto-cast.</para>
- </note>
+ <note>
+ <para>Although this function is only defined for box3d, it also works for box2d and geometry values due to automatic casting.
+ However it will not accept a geometry or box2d text representation, since those do not auto-cast.</para>
+ </note>
- <para>&Z_support;</para>
- <para>&curve_support;</para>
- </refsection>
+ <para>&Z_support;</para>
+ <para>&curve_support;</para>
+ </refsection>
- <refsection>
- <title>Examples</title>
+ <refsection>
+ <title>Examples</title>
- <programlisting>SELECT ST_XMin('BOX3D(1 2 3, 4 5 6)');
+ <programlisting>SELECT ST_XMin('BOX3D(1 2 3, 4 5 6)');
st_xmin
-------
1
@@ -712,52 +712,52 @@ SELECT ST_XMin(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,2
st_xmin
--------
220186.995121892
- </programlisting>
- </refsection>
+ </programlisting>
+ </refsection>
- <!-- Optionally add a "See Also" section -->
- <refsection>
- <title>See Also</title>
+ <!-- Optionally add a "See Also" section -->
+ <refsection>
+ <title>See Also</title>
- <para><xref linkend="ST_XMax"/>, <xref linkend="ST_YMax"/>, <xref linkend="ST_YMin"/>, <xref linkend="ST_ZMax"/>, <xref linkend="ST_ZMin"/></para>
- </refsection>
- </refentry>
+ <para><xref linkend="ST_XMax"/>, <xref linkend="ST_YMin"/>, <xref linkend="ST_YMax"/>, <xref linkend="ST_ZMin"/>, <xref linkend="ST_ZMax"/>, <xref linkend="ST_MMin"/>, <xref linkend="ST_MMax"/></para>
+ </refsection>
+ </refentry>
- <refentry xml:id="ST_YMax">
- <refnamediv>
- <refname>ST_YMax</refname>
+ <refentry xml:id="ST_YMax">
+ <refnamediv>
+ <refname>ST_YMax</refname>
- <refpurpose>Returns the Y maxima of a 2D or 3D bounding box or a geometry.</refpurpose>
- </refnamediv>
+ <refpurpose>Returns the Y maxima of a 2D or 3D bounding box or a geometry.</refpurpose>
+ </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcprototype>
- <funcdef>float <function>ST_YMax</function></funcdef>
- <paramdef><type>box3d </type> <parameter>aGeomorBox2DorBox3D</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>float <function>ST_YMax</function></funcdef>
+ <paramdef><type>box3d </type> <parameter>aGeomorBox2DorBox3D</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
- <refsection>
- <title>Description</title>
+ <refsection>
+ <title>Description</title>
- <para>Returns the Y maxima of a 2D or 3D bounding box or a geometry.</para>
+ <para>Returns the Y maxima of a 2D or 3D bounding box or a geometry.</para>
- <note>
- <para>Although this function is only defined for box3d, it also works for box2d and geometry values due to automatic casting.
- However it will not accept a geometry or box2d text representation, since those do not auto-cast.</para>
- </note>
+ <note>
+ <para>Although this function is only defined for box3d, it also works for box2d and geometry values due to automatic casting.
+ However it will not accept a geometry or box2d text representation, since those do not auto-cast.</para>
+ </note>
- <para>&Z_support;</para>
- <para>&curve_support;</para>
- </refsection>
+ <para>&Z_support;</para>
+ <para>&curve_support;</para>
+ </refsection>
- <refsection>
- <title>Examples</title>
+ <refsection>
+ <title>Examples</title>
- <programlisting>SELECT ST_YMax('BOX3D(1 2 3, 4 5 6)');
+ <programlisting>SELECT ST_YMax('BOX3D(1 2 3, 4 5 6)');
st_ymax
-------
5
@@ -780,52 +780,52 @@ SELECT ST_YMax(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,2
st_ymax
--------
150506.126829327
- </programlisting>
- </refsection>
+ </programlisting>
+ </refsection>
- <!-- Optionally add a "See Also" section -->
- <refsection>
- <title>See Also</title>
+ <!-- Optionally add a "See Also" section -->
+ <refsection>
+ <title>See Also</title>
- <para><xref linkend="ST_XMin"/>, <xref linkend="ST_XMax"/>, <xref linkend="ST_YMin"/>, <xref linkend="ST_ZMax"/>, <xref linkend="ST_ZMin"/></para>
- </refsection>
- </refentry>
+ <para><xref linkend="ST_XMin"/>, <xref linkend="ST_XMax"/>, <xref linkend="ST_YMin"/>, <xref linkend="ST_ZMin"/>, <xref linkend="ST_ZMax"/>, <xref linkend="ST_MMin"/>, <xref linkend="ST_MMax"/></para>
+ </refsection>
+ </refentry>
- <refentry xml:id="ST_YMin">
- <refnamediv>
- <refname>ST_YMin</refname>
+ <refentry xml:id="ST_YMin">
+ <refnamediv>
+ <refname>ST_YMin</refname>
- <refpurpose>Returns the Y minima of a 2D or 3D bounding box or a geometry.</refpurpose>
- </refnamediv>
+ <refpurpose>Returns the Y minima of a 2D or 3D bounding box or a geometry.</refpurpose>
+ </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcprototype>
- <funcdef>float <function>ST_YMin</function></funcdef>
- <paramdef><type>box3d </type> <parameter>aGeomorBox2DorBox3D</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>float <function>ST_YMin</function></funcdef>
+ <paramdef><type>box3d </type> <parameter>aGeomorBox2DorBox3D</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
- <refsection>
- <title>Description</title>
+ <refsection>
+ <title>Description</title>
- <para>Returns the Y minima of a 2D or 3D bounding box or a geometry.</para>
+ <para>Returns the Y minima of a 2D or 3D bounding box or a geometry.</para>
- <note>
- <para>Although this function is only defined for box3d, it also works for box2d and geometry values due to automatic casting.
- However it will not accept a geometry or box2d text representation, since those do not auto-cast.</para>
- </note>
+ <note>
+ <para>Although this function is only defined for box3d, it also works for box2d and geometry values due to automatic casting.
+ However it will not accept a geometry or box2d text representation, since those do not auto-cast.</para>
+ </note>
- <para>&Z_support;</para>
- <para>&curve_support;</para>
- </refsection>
+ <para>&Z_support;</para>
+ <para>&curve_support;</para>
+ </refsection>
- <refsection>
- <title>Examples</title>
+ <refsection>
+ <title>Examples</title>
- <programlisting>SELECT ST_YMin('BOX3D(1 2 3, 4 5 6)');
+ <programlisting>SELECT ST_YMin('BOX3D(1 2 3, 4 5 6)');
st_ymin
-------
2
@@ -848,52 +848,52 @@ SELECT ST_YMin(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,2
st_ymin
--------
150406
- </programlisting>
- </refsection>
+ </programlisting>
+ </refsection>
- <!-- Optionally add a "See Also" section -->
- <refsection>
- <title>See Also</title>
+ <!-- Optionally add a "See Also" section -->
+ <refsection>
+ <title>See Also</title>
- <para><xref linkend="ST_GeomFromEWKT"/>, <xref linkend="ST_XMin"/>, <xref linkend="ST_XMax"/>, <xref linkend="ST_YMax"/>, <xref linkend="ST_ZMax"/>, <xref linkend="ST_ZMin"/></para>
- </refsection>
- </refentry>
+ <para><xref linkend="ST_GeomFromEWKT"/>, <xref linkend="ST_XMin"/>, <xref linkend="ST_XMax"/>, <xref linkend="ST_YMax"/>, <xref linkend="ST_ZMin"/>, <xref linkend="ST_ZMax"/>, <xref linkend="ST_MMin"/>, <xref linkend="ST_MMax"/></para>
+ </refsection>
+ </refentry>
- <refentry xml:id="ST_ZMax">
- <refnamediv>
- <refname>ST_ZMax</refname>
+ <refentry xml:id="ST_ZMax">
+ <refnamediv>
+ <refname>ST_ZMax</refname>
- <refpurpose>Returns the Z maxima of a 2D or 3D bounding box or a geometry.</refpurpose>
- </refnamediv>
+ <refpurpose>Returns the Z maxima of a 2D or 3D bounding box or a geometry.</refpurpose>
+ </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcprototype>
- <funcdef>float <function>ST_ZMax</function></funcdef>
- <paramdef><type>box3d </type> <parameter>aGeomorBox2DorBox3D</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>float <function>ST_ZMax</function></funcdef>
+ <paramdef><type>box3d </type> <parameter>aGeomorBox2DorBox3D</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
- <refsection>
- <title>Description</title>
+ <refsection>
+ <title>Description</title>
- <para>Returns the Z maxima of a 2D or 3D bounding box or a geometry.</para>
+ <para>Returns the Z maxima of a 2D or 3D bounding box or a geometry.</para>
- <note>
- <para>Although this function is only defined for box3d, it also works for box2d and geometry values due to automatic casting.
- However it will not accept a geometry or box2d text representation, since those do not auto-cast.</para>
- </note>
+ <note>
+ <para>Although this function is only defined for box3d, it also works for box2d and geometry values due to automatic casting.
+ However it will not accept a geometry or box2d text representation, since those do not auto-cast.</para>
+ </note>
- <para>&Z_support;</para>
- <para>&curve_support;</para>
- </refsection>
+ <para>&Z_support;</para>
+ <para>&curve_support;</para>
+ </refsection>
- <refsection>
- <title>Examples</title>
+ <refsection>
+ <title>Examples</title>
- <programlisting>SELECT ST_ZMax('BOX3D(1 2 3, 4 5 6)');
+ <programlisting>SELECT ST_ZMax('BOX3D(1 2 3, 4 5 6)');
st_zmax
-------
6
@@ -916,52 +916,52 @@ SELECT ST_ZMax(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,2
st_zmax
--------
3
- </programlisting>
- </refsection>
+ </programlisting>
+ </refsection>
- <!-- Optionally add a "See Also" section -->
- <refsection>
- <title>See Also</title>
+ <!-- Optionally add a "See Also" section -->
+ <refsection>
+ <title>See Also</title>
- <para><xref linkend="ST_GeomFromEWKT"/>, <xref linkend="ST_XMin"/>, <xref linkend="ST_XMax"/>, <xref linkend="ST_YMax"/>, <xref linkend="ST_YMin"/>, <xref linkend="ST_ZMax"/></para>
- </refsection>
- </refentry>
+ <para><xref linkend="ST_GeomFromEWKT"/>, <xref linkend="ST_XMin"/>, <xref linkend="ST_XMax"/>, <xref linkend="ST_YMin"/>, <xref linkend="ST_YMax"/>, <xref linkend="ST_ZMin"/>, <xref linkend="ST_MMin"/>, <xref linkend="ST_MMax"/></para>
+ </refsection>
+ </refentry>
- <refentry xml:id="ST_ZMin">
- <refnamediv>
- <refname>ST_ZMin</refname>
+ <refentry xml:id="ST_ZMin">
+ <refnamediv>
+ <refname>ST_ZMin</refname>
- <refpurpose>Returns the Z minima of a 2D or 3D bounding box or a geometry.</refpurpose>
- </refnamediv>
+ <refpurpose>Returns the Z minima of a 2D or 3D bounding box or a geometry.</refpurpose>
+ </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcprototype>
- <funcdef>float <function>ST_ZMin</function></funcdef>
- <paramdef><type>box3d </type> <parameter>aGeomorBox2DorBox3D</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>float <function>ST_ZMin</function></funcdef>
+ <paramdef><type>box3d </type> <parameter>aGeomorBox2DorBox3D</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
- <refsection>
- <title>Description</title>
+ <refsection>
+ <title>Description</title>
- <para>Returns the Z minima of a 2D or 3D bounding box or a geometry.</para>
+ <para>Returns the Z minima of a 2D or 3D bounding box or a geometry.</para>
- <note>
- <para>Although this function is only defined for box3d, it also works for box2d and geometry values due to automatic casting.
- However it will not accept a geometry or box2d text representation, since those do not auto-cast.</para>
- </note>
+ <note>
+ <para>Although this function is only defined for box3d, it also works for box2d and geometry values due to automatic casting.
+ However it will not accept a geometry or box2d text representation, since those do not auto-cast.</para>
+ </note>
- <para>&Z_support;</para>
- <para>&curve_support;</para>
- </refsection>
+ <para>&Z_support;</para>
+ <para>&curve_support;</para>
+ </refsection>
- <refsection>
- <title>Examples</title>
+ <refsection>
+ <title>Examples</title>
- <programlisting>SELECT ST_ZMin('BOX3D(1 2 3, 4 5 6)');
+ <programlisting>SELECT ST_ZMin('BOX3D(1 2 3, 4 5 6)');
st_zmin
-------
3
@@ -984,15 +984,94 @@ SELECT ST_ZMin(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,2
st_zmin
--------
1
- </programlisting>
- </refsection>
+ </programlisting>
+ </refsection>
- <!-- Optionally add a "See Also" section -->
- <refsection>
- <title>See Also</title>
+ <!-- Optionally add a "See Also" section -->
+ <refsection>
+ <title>See Also</title>
- <para><xref linkend="ST_GeomFromEWKT"/>, <xref linkend="ST_GeomFromText"/>, <xref linkend="ST_XMin"/>, <xref linkend="ST_XMax"/>, <xref linkend="ST_YMax"/>, <xref linkend="ST_YMin"/>, <xref linkend="ST_ZMax"/></para>
- </refsection>
- </refentry>
+ <para><xref linkend="ST_GeomFromEWKT"/>, <xref linkend="ST_GeomFromText"/>, <xref linkend="ST_XMin"/>, <xref linkend="ST_XMax"/>, <xref linkend="ST_YMin"/>, <xref linkend="ST_YMax"/>, <xref linkend="ST_ZMax"/>, <xref linkend="ST_MMin"/>, <xref linkend="ST_MMax"/></para>
+ </refsection>
+ </refentry>
+
+ <refentry xml:id="ST_MMin">
+ <refnamediv>
+ <refname>ST_MMin</refname>
+
+ <refpurpose>Returns the M minima of a geometry.</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>float <function>ST_MMin</function></funcdef><paramdef><type>geometry</type> <parameter>geom</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsection>
+ <title>Description</title>
+
+ <para>Returns the M minima of a geometry, or null of the geometry lacks M values.</para>
+
+ <para>&Z_support;</para>
+ <para>&curve_support;</para>
+ </refsection>
+
+ <refsection>
+ <title>Examples</title>
+
+ <programlisting>SELECT ST_MMin('POINT M (1 2 3)');
+st_mmin
+-------
+3
+ </programlisting>
+ </refsection>
+
+ <refsection>
+ <title>See Also</title>
+
+ <para><xref linkend="ST_XMin"/>, <xref linkend="ST_XMax"/>, <xref linkend="ST_YMin"/>, <xref linkend="ST_YMax"/>, <xref linkend="ST_ZMin"/>, <xref linkend="ST_ZMax"/>, <xref linkend="ST_MMax"/></para>
+ </refsection>
+ </refentry>
+
+
+ <refentry xml:id="ST_MMax">
+ <refnamediv>
+ <refname>ST_MMax</refname>
+
+ <refpurpose>Returns the M minima of a geometry.</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>float <function>ST_MMax</function></funcdef><paramdef><type>geometry</type> <parameter>geom</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsection>
+ <title>Description</title>
+ <para>Returns the M minima of a geometry, or null of the geometry lacks M values.</para>
+
+ <para>&Z_support;</para>
+ <para>&curve_support;</para>
+ </refsection>
+
+ <refsection>
+ <title>Examples</title>
+ <programlisting>SELECT ST_MMax('POINT M (1 2 3)');
+st_mmax
+-------
+3 </programlisting>
+ </refsection>
+
+ <refsection>
+ <title>See Also</title>
+ <para><xref linkend="ST_XMin"/>, <xref linkend="ST_XMax"/>, <xref linkend="ST_YMin"/>, <xref linkend="ST_YMax"/>, <xref linkend="ST_ZMin"/>, <xref linkend="ST_ZMax"/>, <xref linkend="ST_MMin"/></para>
+ </refsection>
+ </refentry>
</section>
diff --git a/doc/reference_coverage.xml b/doc/reference_coverage.xml
index d00788df2..ccd8b868a 100644
--- a/doc/reference_coverage.xml
+++ b/doc/reference_coverage.xml
@@ -177,14 +177,14 @@ SELECT true = ALL (
and can be input to coverage processing functions.
</para>
- <note>To aid in determining a maximum gap width,
+ <note><para>To aid in determining a maximum gap width,
gaps can be computed by cleaning with <code>gapMaximumWidth => 0</code>
and using <xref linkend="ST_CoverageUnion"/> to union the result coverage.
Holes in the union correspond to gaps in the original dataset.
Gap widths can be measured by extracting the holes as polygons
and running <xref linkend="ST_MaximumInscribedCircle"/>
on them; the gap width is twice the computed radius.
- </note>
+ </para></note>
<para role="availability" conformance="3.6.0">Availability: 3.6.0 - requires GEOS >= 3.14.0</para>
</refsection>
diff --git a/postgis/lwgeom_box3d.c b/postgis/lwgeom_box3d.c
index 96288e624..11ba71483 100644
--- a/postgis/lwgeom_box3d.c
+++ b/postgis/lwgeom_box3d.c
@@ -455,6 +455,41 @@ Datum BOX3D_zmax(PG_FUNCTION_ARGS)
PG_RETURN_FLOAT8(Max(box->zmin, box->zmax));
}
+
+Datum ST_MMin(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(ST_MMin);
+Datum ST_MMin(PG_FUNCTION_ARGS)
+{
+ GBOX gbox;
+ GSERIALIZED *gser = PG_GETARG_GSERIALIZED_P(0);
+
+ if (gserialized_get_gbox_p(gser, &gbox) != LW_TRUE)
+ PG_RETURN_NULL();
+
+ if (!FLAGS_GET_M(gbox.flags))
+ PG_RETURN_NULL();
+
+ PG_RETURN_FLOAT8(Min(gbox.mmin, gbox.mmax));
+}
+
+
+Datum ST_MMax(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(ST_MMax);
+Datum ST_MMax(PG_FUNCTION_ARGS)
+{
+ GBOX gbox;
+ GSERIALIZED *gser = PG_GETARG_GSERIALIZED_P(0);
+
+ if (gserialized_get_gbox_p(gser, &gbox) != LW_TRUE)
+ PG_RETURN_NULL();
+
+ if (!FLAGS_GET_M(gbox.flags))
+ PG_RETURN_NULL();
+
+ PG_RETURN_FLOAT8(Max(gbox.mmin, gbox.mmax));
+}
+
+
/**
* Used in the ST_Extent and ST_Extent3D aggregates, does not read the
* serialized cached bounding box (since that is floating point)
diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in
index f508024c5..c1a57bc0d 100644
--- a/postgis/postgis.sql.in
+++ b/postgis/postgis.sql.in
@@ -1098,6 +1098,20 @@ CREATE OR REPLACE FUNCTION ST_ZMax(box3d)
LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
_COST_DEFAULT;
+-- Availability: 3.7.0
+CREATE OR REPLACE FUNCTION ST_MMin(geometry)
+ RETURNS FLOAT8
+ AS 'MODULE_PATHNAME','ST_MMin'
+ LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
+ _COST_DEFAULT;
+
+-- Availability: 3.7.0
+CREATE OR REPLACE FUNCTION ST_MMax(geometry)
+ RETURNS FLOAT8
+ AS 'MODULE_PATHNAME','ST_MMax'
+ LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
+ _COST_DEFAULT;
+
-----------------------------------------------------------------------------
-- BOX2D FUNCTIONS
-----------------------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
doc/reference_accessor.xml | 6 +-
doc/reference_bbox.xml | 1291 +++++++++++++++++++++++---------------------
doc/reference_coverage.xml | 4 +-
postgis/lwgeom_box3d.c | 35 ++
postgis/postgis.sql.in | 14 +
5 files changed, 739 insertions(+), 611 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list