]> granicus.if.org Git - postgis/commitdiff
change shortestline/longestline point/line example
authorRegina Obe <lr@pcorp.us>
Thu, 26 Nov 2009 16:52:53 +0000 (16:52 +0000)
committerRegina Obe <lr@pcorp.us>
Thu, 26 Nov 2009 16:52:53 +0000 (16:52 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@4903 b70326c6-7e19-0410-871a-916f4a2858ee

doc/html/image_src/st_longestline01.wkt
doc/html/image_src/st_shortestline01.wkt
doc/reference_measure.xml

index 23631b1b8d1b64ef18315cd3aa9f99412acc502d..f7c523f6f5de63e840a3f433baf094764c7ccbe8 100644 (file)
@@ -1,3 +1,3 @@
-Style2;POINT(100 150)
+Style2;POINT(100 100)
 Style2-mediumline;LINESTRING (20 80, 98 190, 110 180, 50 75 )
-Style1-thinline;LINESTRING(100 150,20 80)
+Style1-thinline;LINESTRING(100 100,98 190)
index f9f5d0dbb870fdc0ebe9fee8033b72f29a58631f..fd4a823b1649974c098e5967e56782832398fee4 100644 (file)
@@ -1,3 +1,3 @@
-Style2;POINT(100 150)
+Style2;POINT(100 100)
 Style2-mediumline;LINESTRING (20 80, 98 190, 110 180, 50 75 )
-Style1-thinline;LINESTRING(100 150,94.6153846153846 153.076923076923)
+Style1-thinline;LINESTRING(100 100,73.0769230769231 115.384615384615)
index 6ec3f2e1160a9237351aa2999074d9c4bc7a27f6..cbd2e6c8e016a24b4c5b9e6eb5b9e8a8dbad800b 100644 (file)
@@ -1440,13 +1440,14 @@ postgis=# SELECT ST_MaxDistance('POINT(0 0)'::geometry, 'LINESTRING ( 2 2, 2 2 )
                                                  </informalfigure>
                                <programlisting>
 SELECT ST_AsText(
-       ST_ShortestLine('POINT(100 150)'::geometry, 
+       ST_ShortestLine('POINT(100 100)'::geometry, 
                'LINESTRING (20 80, 98 190, 110 180, 50 75 )'::geometry)
        ) As sline;
+
        
    sline
 -----------------
-LINESTRING(100 150,94.6153846153846 153.076923076923)
+LINESTRING(100 100,73.0769230769231 115.384615384615)
                                </programlisting>
                                                  </para></entry>
 
@@ -1520,7 +1521,7 @@ SELECT ST_AsText(
          <refsection>
                <title>Examples</title>
                        <informaltable>
-                                 <tgroup cols="2">
+                                 <tgroup cols="3">
                                        <tbody>
                                          <row>
                                                <entry><para><informalfigure>
@@ -1533,13 +1534,14 @@ SELECT ST_AsText(
                                                  </informalfigure>
                                <programlisting>
 SELECT ST_AsText(
-       ST_LongestLine('POINT(100 150)'::geometry, 
+       ST_LongestLine('POINT(100 100)'::geometry, 
                'LINESTRING (20 80, 98 190, 110 180, 50 75 )'::geometry)
        ) As lline;
+
        
    lline
 -----------------
-LINESTRING(100 150,20 80)
+LINESTRING(100 100,98 190)
                                </programlisting>
                                                  </para></entry>
 
@@ -1554,7 +1556,31 @@ LINESTRING(100 150,20 80)
                                <programlisting>
 SELECT ST_AsText(
        ST_LongestLine(
-               ST_GeomFromText('POLYGON((175 150, 20 40, 50 60, 125 100, 175 150))'),
+               ST_GeomFromText('POLYGON((175 150, 20 40, 
+                       50 60, 125 100, 175 150))'),
+               ST_Buffer(ST_GeomFromText('POINT(110 170)'), 20)
+               ) 
+       ) As llinewkt;
+               
+   lline
+-----------------
+LINESTRING(20 40,121.111404660392 186.629392246051)
+                               </programlisting>
+                                               </para></entry>
+                                               
+                                               <entry><para><informalfigure>
+                                                       <mediaobject>
+                                                         <imageobject>
+                                                               <imagedata fileref="images/st_longestline03.png" />
+                                                         </imageobject>
+                                                         <caption><para>longest straight distance to travel within an area</para></caption>
+                                                       </mediaobject>
+                                                 </informalfigure>
+                               <programlisting>
+SELECT ST_AsText(
+       ST_LongestLine(
+               ST_GeomFromText('POLYGON((175 150, 20 40, 
+                       50 60, 125 100, 175 150))'),
                ST_Buffer(ST_GeomFromText('POINT(110 170)'), 20)
                ) 
        ) As llinewkt;