]> granicus.if.org Git - postgis/commitdiff
Add documentation for ST_Tesselate with figures
authorRegina Obe <lr@pcorp.us>
Tue, 15 Jul 2014 05:40:35 +0000 (05:40 +0000)
committerRegina Obe <lr@pcorp.us>
Tue, 15 Jul 2014 05:40:35 +0000 (05:40 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@12781 b70326c6-7e19-0410-871a-916f4a2858ee

doc/html/image_src/Makefile.in
doc/html/image_src/st_tesselate03.wkt [new file with mode: 0644]
doc/html/image_src/st_tesselate04.wkt [new file with mode: 0644]
doc/html/images/st_tesselate01.png [new file with mode: 0644]
doc/html/images/st_tesselate02.png [new file with mode: 0644]
doc/reference_sfcgal.xml

index 005e48278ab55191a0ceb25209a9846e163a4223..7fd25ec671a19dba272ec7734cf82d4574dfc946 100644 (file)
@@ -112,6 +112,8 @@ IMAGES= \
        ../images/st_straightskeleton01.png \
        ../images/st_symdifference01.png \
        ../images/st_symdifference02.png \
+       ../images/st_tesselate03.png \
+       ../images/st_tesselate04.png \
        ../images/st_touches01.png \
        ../images/st_touches02.png \
        ../images/st_touches03.png \
diff --git a/doc/html/image_src/st_tesselate03.wkt b/doc/html/image_src/st_tesselate03.wkt
new file mode 100644 (file)
index 0000000..d2a1de6
--- /dev/null
@@ -0,0 +1 @@
+Style1;POLYGON (( 10 190, 10 70, 80 70, 80 130, 50 160, 120 160, 120 190, 10 190 ))\r
diff --git a/doc/html/image_src/st_tesselate04.wkt b/doc/html/image_src/st_tesselate04.wkt
new file mode 100644 (file)
index 0000000..c654f09
--- /dev/null
@@ -0,0 +1,5 @@
+Style1;POLYGON((80 130,50 160,80 70,80 130))\r
+Style2;POLYGON((50 160,10 190,10 70,50 160))\r
+Style3;POLYGON((80 70,50 160,10 70,80 70))\r
+Style4;POLYGON((120 160,120 190,50 160,120 160))\r
+Style5;POLYGON((120 190,10 190,50 160,120 190))
\ No newline at end of file
diff --git a/doc/html/images/st_tesselate01.png b/doc/html/images/st_tesselate01.png
new file mode 100644 (file)
index 0000000..d48a4ef
Binary files /dev/null and b/doc/html/images/st_tesselate01.png differ
diff --git a/doc/html/images/st_tesselate02.png b/doc/html/images/st_tesselate02.png
new file mode 100644 (file)
index 0000000..30be146
Binary files /dev/null and b/doc/html/images/st_tesselate02.png differ
index 9ff3315fdc84dc9fbedeb1156e81a12a9fb0d96a..9289d291067822e101021f3f87ce87009051849f 100644 (file)
@@ -389,7 +389,7 @@ FROM  ST_GeomFromText('LINESTRING Z (2 2 6,1.5 1.5 7,1 1 8,0.5 0.5 8,0 0 10)') A
          <refnamediv>
                <refname>ST_Tesselate</refname>
 
-               <refpurpose>Perform surface Tesselation</refpurpose>
+               <refpurpose>Perform surface Tesselation of a polygon or polyhedralsurface and returns as a TIN or collection of TINS</refpurpose>
          </refnamediv>
 
          <refsynopsisdiv>
@@ -403,13 +403,86 @@ FROM  ST_GeomFromText('LINESTRING Z (2 2 6,1.5 1.5 7,1 1 8,0.5 0.5 8,0 0 10)') A
 
          <refsection>
                <title>Description</title>
-
+               <para>Takes as input a surface such a  MULTI(POLYGON) or POLYHEDRALSURFACE and returns a TIN representation via the process of tesselation using triangles.</para>
                <para>Availability: 2.1.0</para>
                <para>&sfcgal_required;</para>
                <para>&Z_support;</para>
                <para>&P_support;</para>
                <para>&T_support;</para>
          </refsection>
+         
+         <informaltable>
+                                 <tgroup cols="2">
+                                       <tbody>
+                                         <row>
+                                               <entry><para>
+                                               <programlisting>SELECT ST_GeomFromText('POLYHEDRALSURFACE Z( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), 
+               ((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), 
+               ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)), 
+               ((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) )');</programlisting>
+                                               <informalfigure>
+                                                       <mediaobject>
+                                                         <imageobject>
+                                                               <imagedata fileref="images/st_tesselation01.png" />
+                                                         </imageobject>
+                                                         <caption><para>Original Cube</para></caption>
+                                                       </mediaobject>
+                                                 </informalfigure></para>
+                                         </entry>
+                                         <entry><para>
+                                         <programlisting>SELECT ST_Tesselate(ST_GeomFromText('POLYHEDRALSURFACE Z( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), 
+               ((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), 
+               ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)), 
+               ((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) )'));</programlisting></para>
+               <para>ST_AsText output:</para>
+               <screen>TIN Z (((0 0 0,0 0 1,0 1 1,0 0 0)),((0 1 0,0 0 0,0 1 1,0 1 0)),((0 0 0,0 1 0,1 1 0,0 0 0)),
+               ((1 0 0,0 0 0,1 1 0,1 0 0)),((0 0 1,1 0 0,1 0 1,0 0 1)),((0 0 1,0 0 0,1 0 0,0 0 1)),
+               ((1 1 0,1 1 1,1 0 1,1 1 0)),((1 0 0,1 1 0,1 0 1,1 0 0)),((0 1 0,0 1 1,1 1 1,0 1 0)),
+               ((1 1 0,0 1 0,1 1 1,1 1 0)),((0 1 1,1 0 1,1 1 1,0 1 1)),((0 1 1,0 0 1,1 0 1,0 1 1)))</screen>
+                                         <para><informalfigure>
+                                                       <mediaobject>
+                                                         <imageobject>
+                                                               <imagedata fileref="images/st_tesselation02.png" />
+                                                         </imageobject>
+                                                         <caption><para>Tesselated Cube with triangles colored</para></caption>
+                                                       </mediaobject>
+                                                 </informalfigure></para>
+                                         </entry>
+                                         </row>
+                                         
+                                         <row>
+                                               <entry><para>
+                                               <programlisting>SELECT 'POLYGON (( 10 190, 10 70, 80 70, 80 130, 50 160, 120 160, 120 190, 10 190 ))'::geometry;</programlisting>
+                                               <informalfigure>
+                                                       <mediaobject>
+                                                         <imageobject>
+                                                               <imagedata fileref="images/st_tesselate03.png" />
+                                                         </imageobject>
+                                                         <caption><para>Original polygon</para></caption>
+                                                       </mediaobject>
+                                                 </informalfigure></para>
+                                         </entry>
+                                         <entry><para>
+                                         <programlisting>SELECT 
+       ST_Tesselate('POLYGON (( 10 190, 10 70, 80 70, 80 130, 50 160, 120 160, 120 190, 10 190 ))'::geometry);</programlisting>
+       </para>
+       <para>ST_AsText output</para>
+       <screen>TIN(((80 130,50 160,80 70,80 130)),((50 160,10 190,10 70,50 160)),
+        ((80 70,50 160,10 70,80 70)),((120 160,120 190,50 160,120 160)),((120 190,10 190,50 160,120 190)))</screen>
+                                         <para><informalfigure>
+                                                       <mediaobject>
+                                                         <imageobject>
+                                                               <imagedata fileref="images/st_tesselate04.png" />
+                                                         </imageobject>
+                                                         <caption><para>Tesselated Polygon</para></caption>
+                                                       </mediaobject>
+                                                 </informalfigure></para>
+                                         </entry>
+                                         </row>
+                               </tbody>
+                               </tgroup>
+                       </informaltable>
+         </refsection>
 
        </refentry>