]> granicus.if.org Git - postgis/commitdiff
more examples for ST_Offsetcurve
authorRegina Obe <lr@pcorp.us>
Tue, 26 Jul 2011 15:39:31 +0000 (15:39 +0000)
committerRegina Obe <lr@pcorp.us>
Tue, 26 Jul 2011 15:39:31 +0000 (15:39 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@7680 b70326c6-7e19-0410-871a-916f4a2858ee

doc/html/image_src/Makefile.in
doc/html/image_src/st_offsetcurve05.wkt [new file with mode: 0644]
doc/html/image_src/st_offsetcurve06.wkt [new file with mode: 0644]
doc/reference_processing.xml

index 846c62e33bad733c0ae227eca22cc23eaa7dfe46..3dbc732bc270b643aa0e1a1358db334e445bb88b 100644 (file)
@@ -87,6 +87,8 @@ IMAGES= \
        ../images/st_offsetcurve02.png \
        ../images/st_offsetcurve03.png \
        ../images/st_offsetcurve04.png \
+       ../images/st_offsetcurve05.png \
+       ../images/st_offsetcurve06.png \
        ../images/st_minimumboundingcircle01.png \
        ../images/st_sharedpaths01.png \
        ../images/st_sharedpaths02.png \
diff --git a/doc/html/image_src/st_offsetcurve05.wkt b/doc/html/image_src/st_offsetcurve05.wkt
new file mode 100644 (file)
index 0000000..18c60d4
--- /dev/null
@@ -0,0 +1,2 @@
+Style1-thinline;LINESTRING(164 16,144 16,124 16,104 16,84 16,64 16,44 16,24 16,20 16,18 16,17 17,16 18,16 20,16 40,16 60,16 80,16 100,16 120,16 140,16 160,16 180,16 195)
+Style2-thinline;LINESTRING(164 31,46 31,40.2597485145236 32.1418070123307,35.3933982822018 35.3933982822018,32.1418070123307 40.2597485145237,31 46,31 195)
diff --git a/doc/html/image_src/st_offsetcurve06.wkt b/doc/html/image_src/st_offsetcurve06.wkt
new file mode 100644 (file)
index 0000000..0ba31f7
--- /dev/null
@@ -0,0 +1,3 @@
+Style1-thinline;LINESTRING(164 16,144 16,124 16,104 16,84 16,64 16,44 16,24 16,20 16,18 16,17 17,16 18,16 20,16 40,16 60,16 80,16 100,16 120,16 140,16 160,16 180,16 195)
+Style2-thinline;LINESTRING(164 1,18 1,12.2597485145237 2.1418070123307,7.39339828220179 5.39339828220179,5.39339828220179 7.39339828220179,2.14180701233067 12.2597485145237,1 18,1 195)
+Style2-thinline;LINESTRING(164 31,46 31,40.2597485145236 32.1418070123307,35.3933982822018 35.3933982822018,32.1418070123307 40.2597485145237,31 46,31 195)
index babe21d7edc72f237f15994762c4f7eac06cfadd..ca49b0d3af04feb495c90d6075280596c511c1d8 100644 (file)
@@ -392,26 +392,76 @@ LINESTRING(164 1,18 1,12.2597485145237 2.1418070123307,
        2.14180701233067 12.2597485145237,1 18,1 195)
                                </programlisting>
                                                  </para></entry>
-
                                                <entry><para><informalfigure>
                                                        <mediaobject>
                                                          <imageobject>
                                                                <imagedata fileref="images/st_offsetcurve02.png" />
                                                          </imageobject>
                                                          <caption><para>-15, 'quad_segs=4 join=round' original line 
-                                                               and its offset -15 units and then a double-offset to get more curvy</para></caption>
+                                                               and its offset -15 units </para></caption>
                                                        </mediaobject>
                                                  </informalfigure>
                                <programlisting>
 SELECT ST_AsText(ST_OffsetCurve(geom,
-       -15, 'quad_segs=4 join=round')) As nosocurvy
+       -15, 'quad_segs=4 join=round')) As notsocurvy
        FROM ST_GeomFromText(
 'LINESTRING(164 16,144 16,124 16,104 16,84 16,64 16,
        44 16,24 16,20 16,18 16,17 17,
        16 18,16 20,16 40,16 60,16 80,16 100,
        16 120,16 140,16 160,16 180,16 195)') As geom;
--- output --
+-- notsocurvy --
 LINESTRING(31 195,31 31,164 31)
+                               </programlisting>
+                                               </para></entry>
+                                         </row>
+                                        <row> 
+                                               <entry><para><informalfigure>
+                                                       <mediaobject>
+                                                         <imageobject>
+                                                               <imagedata fileref="images/st_offsetcurve05.png" />
+                                                         </imageobject>
+                                                         <caption><para>double-offset to get more curvy, note the first reverses direction, so -30 + 15 = -15</para></caption>
+                                                       </mediaobject>
+                                                 </informalfigure>
+                               <programlisting>
+SELECT ST_AsText(ST_OffsetCurve(ST_OffsetCurve(geom,
+       -30, 'quad_segs=4 join=round'), -15, 'quad_segs=4 join=round')) As morecurvy
+       FROM ST_GeomFromText(
+'LINESTRING(164 16,144 16,124 16,104 16,84 16,64 16,
+       44 16,24 16,20 16,18 16,17 17,
+       16 18,16 20,16 40,16 60,16 80,16 100,
+       16 120,16 140,16 160,16 180,16 195)') As geom;
+-- morecurvy --
+LINESTRING(164 31,46 31,40.2597485145236 32.1418070123307,
+35.3933982822018 35.3933982822018,
+32.1418070123307 40.2597485145237,31 46,31 195)
+                               </programlisting>
+                                               </para></entry>
+<entry><para><informalfigure>
+                                                       <mediaobject>
+                                                         <imageobject>
+                                                               <imagedata fileref="images/st_offsetcurve06.png" />
+                                                         </imageobject>
+                                                         <caption><para>double-offset to get more curvy,combined with regular offset 15 to get parallel lines.  Overlaid with original.</para></caption>
+                                                       </mediaobject>
+                                                 </informalfigure>
+                               <programlisting>SELECT ST_AsText(ST_Collect(
+       ST_OffsetCurve(geom, 15, 'quad_segs=4 join=round'), 
+       ST_OffsetCurve(ST_OffsetCurve(geom,
+       -30, 'quad_segs=4 join=round'), -15, 'quad_segs=4 join=round')
+       )
+) As parallel_curves
+       FROM ST_GeomFromText(
+'LINESTRING(164 16,144 16,124 16,104 16,84 16,64 16,
+       44 16,24 16,20 16,18 16,17 17,
+       16 18,16 20,16 40,16 60,16 80,16 100,
+       16 120,16 140,16 160,16 180,16 195)') As geom;
+-- parallel curves  --
+MULTILINESTRING((164 1,18 1,12.2597485145237 2.1418070123307,
+7.39339828220179 5.39339828220179,5.39339828220179 7.39339828220179,
+2.14180701233067 12.2597485145237,1 18,1 195),
+(164 31,46 31,40.2597485145236 32.1418070123307,35.3933982822018 35.3933982822018,
+32.1418070123307 40.2597485145237,31 46,31 195))
                                </programlisting>
                                                </para></entry>
                                          </row>