mirror of
https://git.osgeo.org/gitea/postgis/postgis
synced 2024-10-24 00:52:40 +00:00
Added ST_3DShortestLine in doc and some small editing. ST_3DLongestLine is still missing.
Regina, please take a look if it looks ok. git-svn-id: http://svn.osgeo.org/postgis/trunk@6607 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
parent
af656e2f02
commit
08686b226c
|
@ -6,7 +6,7 @@
|
|||
<refname>ST_3DClosestPoint</refname>
|
||||
|
||||
<refpurpose>Returns the 3-dimensional point on g1 that is closest to g2. This is the first point of
|
||||
the shortest line. </refpurpose>
|
||||
the 3D shortest line. </refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
|
@ -27,7 +27,7 @@
|
|||
<title>Description</title>
|
||||
|
||||
<para>Returns the 3-dimensional point on g1 that is closest to g2. This is the first point of
|
||||
the shortest line. The length of the shortest line is the 3D distance.
|
||||
the 3D shortest line. The 3D length of the 3D shortest line is the 3D distance.
|
||||
</para>
|
||||
<para>&Z_support;</para>
|
||||
<para>Availability: 2.0.0</para>
|
||||
|
@ -91,7 +91,7 @@ SELECT ST_AsEWKT(ST_3DClosestPoint(line,pt)) AS cp3d_line_pt,
|
|||
<refsection>
|
||||
<title>See Also</title>
|
||||
|
||||
<para><xref linkend="ST_AsEWKT" />, <xref linkend="ST_ClosestPoint"/>,, <xref linkend="ST_3DDistance"/></para>
|
||||
<para><xref linkend="ST_AsEWKT" />, <xref linkend="ST_ClosestPoint"/>,<xref linkend="ST_3DDistance"/>,<xref linkend="ST_3DShortestLine"/></para>
|
||||
</refsection>
|
||||
</refentry>
|
||||
<refentry id="ST_3DDistance">
|
||||
|
@ -163,7 +163,7 @@ SELECT ST_3DDistance(poly, mline) As dist3d,
|
|||
<refsection>
|
||||
<title>See Also</title>
|
||||
|
||||
<para><xref linkend="ST_Distance"/>,<xref linkend="ST_3DClosestPoint"/>,<xref linkend="ST_3DDWithin"/>,<xref linkend="ST_3DMaxDistance" />, <xref linkend="ST_Transform" /></para>
|
||||
<para><xref linkend="ST_Distance"/>,<xref linkend="ST_3DClosestPoint"/>,<xref linkend="ST_3DDWithin"/>,<xref linkend="ST_3DMaxDistance" />, <xref linkend="ST_3DShortestLine"/>,<xref linkend="ST_Transform" /></para>
|
||||
</refsection>
|
||||
</refentry>
|
||||
|
||||
|
@ -415,6 +415,104 @@ SELECT ST_3DMaxDistance(
|
|||
<para><xref linkend="ST_Distance"/>,<xref linkend="ST_3DDWithin"/>,<xref linkend="ST_3DMaxDistance" />, <xref linkend="ST_Transform" /></para>
|
||||
</refsection>
|
||||
</refentry>
|
||||
<refentry id="ST_3DShortestLine">
|
||||
<refnamediv>
|
||||
<refname>ST_3DShortestLine</refname>
|
||||
|
||||
<refpurpose>Returns the 3-dimensional shortest line between two geometries</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>geometry <function>ST_3DShortestLine</function></funcdef>
|
||||
|
||||
<paramdef><type>geometry </type>
|
||||
<parameter>g1</parameter></paramdef>
|
||||
|
||||
<paramdef><type>geometry </type>
|
||||
<parameter>g2</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsection>
|
||||
<title>Description</title>
|
||||
|
||||
<para>Returns the 3-dimensional shortest line between two geometries. The function will
|
||||
only return the first shortest line if more than one, that the function finds.
|
||||
If g1 and g2 intersects in just one point the function will return a line with both start
|
||||
and end in that intersection-point.
|
||||
If g1 and g2 are intersecting with more than one point the function will return a line with start
|
||||
and end in the same point but it can be any of the intersecting points.
|
||||
The line returned will always start in g1 and end in g2.
|
||||
The 3D length of the line this function returns will always be the same as st_3DDistance returns for g1 and g2.
|
||||
</para>
|
||||
|
||||
<para>Availability: 2.0.0</para>
|
||||
</refsection>
|
||||
|
||||
<refsection>
|
||||
<title>Examples</title>
|
||||
<informaltable>
|
||||
<tgroup cols="1">
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><para>linestring and point -- both 3d and 2d shortest line
|
||||
<programlisting>
|
||||
SELECT ST_AsEWKT(ST_3DShortestLine(line,pt)) AS shl3d_line_pt,
|
||||
ST_AsEWKT(ST_ShortestLine(line,pt)) As shl2d_line_pt
|
||||
FROM (SELECT 'POINT(100 100 30)'::geometry As pt,
|
||||
'LINESTRING (20 80 20, 98 190 1, 110 180 3, 50 75 1000)'::geometry As line
|
||||
) As foo;
|
||||
|
||||
|
||||
shl3d_line_pt | shl2d_line_pt
|
||||
-----------------------------------------------------------+------------------------------------------
|
||||
LINESTRING(54.6993798867619 128.935022917228 11.5475869506606,100 100 30) | LINESTRING(73.0769230769231 115.384615384615,100 100)
|
||||
</programlisting>
|
||||
</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>linestring and multipoint -- both 3d and 2d shortest line
|
||||
<programlisting>SELECT ST_AsEWKT(ST_3DShortestLine(line,pt)) AS shl3d_line_pt,
|
||||
ST_AsEWKT(ST_ShortestLine(line,pt)) As shl2d_line_pt
|
||||
FROM (SELECT 'MULTIPOINT(100 100 30, 50 74 1000)'::geometry As pt,
|
||||
'LINESTRING (20 80 20, 98 190 1, 110 180 3, 50 75 900)'::geometry As line
|
||||
) As foo;
|
||||
|
||||
|
||||
shl3d_line_pt | shl2d_line_pt
|
||||
-----------------------------------------------------------+--------------
|
||||
LINESTRING(54.6993798867619 128.935022917228 11.5475869506606,100 100 30) | LINESTRING(50 75,50 74)
|
||||
</programlisting>
|
||||
</para></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><para>Multilinestring and polygon both 3d and 2d closest point
|
||||
<programlisting>SELECT ST_AsEWKT(ST_3DShortestLine(poly, mline)) As shl3d,
|
||||
ST_AsEWKT(ST_ShortestLine(poly, mline)) As shl2d
|
||||
FROM (SELECT ST_GeomFromEWKT('POLYGON((175 150 5, 20 40 5, 35 45 5, 50 60 5, 100 100 5, 175 150 5))') As poly,
|
||||
ST_GeomFromEWKT('MULTILINESTRING((175 155 2, 20 40 20, 50 60 -2, 125 100 1, 175 155 1),
|
||||
(1 10 2, 5 20 1))') As mline ) As foo;
|
||||
shl3d | shl2d
|
||||
-------------------------------------------+--------------
|
||||
LINESTRING(39.993580415989 54.1889925532825 5,40.4078575708294 53.6052383805529 5.03423778139177) | LINESTRING(20 40,20 40)
|
||||
</programlisting>
|
||||
</para></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
|
||||
</refsection>
|
||||
|
||||
<refsection>
|
||||
<title>See Also</title>
|
||||
|
||||
<para><xref linkend="ST_3DClosestPoint"/>, <xref linkend="ST_3DDistance"/>, <xref linkend="ST_LongestLine"/>, <xref linkend="ST_ShortestLine"/>, <xref linkend="ST_3DMaxDistance"/></para>
|
||||
</refsection>
|
||||
</refentry>
|
||||
<refentry id="ST_Area">
|
||||
<refnamediv>
|
||||
<refname>ST_Area</refname>
|
||||
|
@ -3539,7 +3637,7 @@ SELECT ST_AsText(
|
|||
<refsection>
|
||||
<title>See Also</title>
|
||||
|
||||
<para><xref linkend="ST_ClosestPoint"/>, <xref linkend="ST_Distance"/>, <xref linkend="ST_LongestLine"/>, <xref linkend="ST_ShortestLine"/>, <xref linkend="ST_MaxDistance"/></para>
|
||||
<para><xref linkend="ST_ClosestPoint"/>, <xref linkend="ST_Distance"/>, <xref linkend="ST_LongestLine"/>, <xref linkend="ST_MaxDistance"/></para>
|
||||
</refsection>
|
||||
</refentry>
|
||||
|
||||
|
|
Loading…
Reference in a new issue