Put in images for ST_ShortestLine

git-svn-id: http://svn.osgeo.org/postgis/trunk@4896 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
Regina Obe 2009-11-25 22:12:14 +00:00
parent 4fec81c947
commit 394ab437f9
4 changed files with 55 additions and 5 deletions

View file

@ -66,6 +66,8 @@ IMAGES= \
../images/st_line_interpolate_point01.png \ ../images/st_line_interpolate_point01.png \
../images/st_line_substring01.png \ ../images/st_line_substring01.png \
../images/st_minimumboundingcircle01.png \ ../images/st_minimumboundingcircle01.png \
../images/st_shortestline01.png \
../images/st_shortestline02.png \
../images/st_symdifference01.png \ ../images/st_symdifference01.png \
../images/st_symdifference02.png \ ../images/st_symdifference02.png \
../images/st_touches01.png \ ../images/st_touches01.png \

View file

@ -0,0 +1,3 @@
Style2;POINT(100 50)
Style2-mediumline;LINESTRING (10 80, 100 199 )
Style1-thinline;LINESTRING(100 50,28.3145411257356 104.21589326625)

View file

@ -0,0 +1,3 @@
Style2;POLYGON((100 150, 20 40, 50 60, 80 100, 100 150))
Style2-mediumline;POLYGON((120 170,119.807852804032 168.049096779839,119.238795325113 166.173165676349,118.314696123025 164.444297669804,117.071067811865 162.928932188135,115.555702330196 161.685303876975,113.826834323651 160.761204674887,111.950903220161 160.192147195968,110 160,108.049096779839 160.192147195968,106.173165676349 160.761204674887,104.444297669804 161.685303876975,102.928932188135 162.928932188135,101.685303876975 164.444297669804,100.761204674887 166.173165676349,100.192147195968 168.049096779839,100 170,100.192147195968 171.950903220161,100.761204674887 173.826834323651,101.685303876975 175.555702330196,102.928932188135 177.071067811865,104.444297669804 178.314696123025,106.173165676349 179.238795325113,108.049096779839 179.807852804032,110 180,111.950903220161 179.807852804032,113.826834323651 179.238795325113,115.555702330196 178.314696123025,117.071067811865 177.071067811866,118.314696123025 175.555702330196,119.238795325113 173.826834323651,119.807852804032 171.950903220161,120 170))
Style1-thinline;LINESTRING(100 150,105.845576631004 160.93630466764)

View file

@ -1426,12 +1426,54 @@ postgis=# SELECT ST_MaxDistance('POINT(0 0)'::geometry, 'LINESTRING ( 2 2, 2 2 )
<refsection> <refsection>
<title>Examples</title> <title>Examples</title>
<informaltable>
<programlisting>postgis=# SELECT astext(st_shortestline('POINT(0 0)'::geometry, 'LINESTRING ( 2 0, 0 2 )'::geometry)) as st_shortestline; <tgroup cols="2">
st_shortestline <tbody>
<row>
<entry><para><informalfigure>
<mediaobject>
<imageobject>
<imagedata fileref="images/st_shortestline01.png" />
</imageobject>
<caption><para>Shortest line between point and line</para></caption>
</mediaobject>
</informalfigure>
<programlisting>
SELECT ST_AsText(
ST_ShortestLine('POINT(100 50)'::geometry,
'LINESTRING (10 80, 100 199 )'::geometry)
) As sline;
sline
----------------- -----------------
LINESTRING(0 0,1 1) LINESTRING(100 50,28.3145411257356 104.21589326625)
(1 row)</programlisting> </programlisting>
</para></entry>
<entry><para><informalfigure>
<mediaobject>
<imageobject>
<imagedata fileref="images/st_shortestline02.png" />
</imageobject>
<caption><para>shortest line between polygon and polygon</para></caption>
</mediaobject>
</informalfigure>
<programlisting>
SELECT ST_AsText(
ST_ShortestLine(
ST_GeomFromText('POLYGON((100 150, 20 40, 50 60, 80 100, 100 150))'),
ST_Buffer(ST_GeomFromText('POINT(110 170)'), 10)
)
) As slinewkt;
LINESTRING(100 150,105.845576631004 160.93630466764)
</programlisting>
</para></entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsection> </refsection>
<refsection> <refsection>