]> granicus.if.org Git - postgis/commitdiff
surreal clipping
authorRegina Obe <lr@pcorp.us>
Fri, 16 Mar 2012 12:58:47 +0000 (12:58 +0000)
committerRegina Obe <lr@pcorp.us>
Fri, 16 Mar 2012 12:58:47 +0000 (12:58 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9512 b70326c6-7e19-0410-871a-916f4a2858ee

doc/html/images/st_clip04.png [new file with mode: 0644]
doc/html/images/st_clip05.png [new file with mode: 0644]
doc/reference_raster.xml

diff --git a/doc/html/images/st_clip04.png b/doc/html/images/st_clip04.png
new file mode 100644 (file)
index 0000000..a1fbf5d
Binary files /dev/null and b/doc/html/images/st_clip04.png differ
diff --git a/doc/html/images/st_clip05.png b/doc/html/images/st_clip05.png
new file mode 100644 (file)
index 0000000..e1b1414
Binary files /dev/null and b/doc/html/images/st_clip05.png differ
index 67d87560857c45bbec29d9f504769e06342e196a..9ea47a5b54084d88fe10b6843dd84add4716d5a3 100644 (file)
@@ -5444,6 +5444,41 @@ WHERE rid = 6) As foo;
                </row>
        </tbody>
 </tgroup>
+</informaltable>
+                       </refsection>
+                       <refsection>
+                               <title>Examples: 1 band clipping with no crop and add back other bands unchanged</title>                                
+<programlisting>-- Same example as before, but we need to set crop to false to be able to use ST_AddBand
+-- because ST_AddBand requires all bands be the same Width and height
+SELECT ST_AddBand(ST_Clip(rast, 1,
+               ST_Buffer(ST_Centroid(ST_Envelope(rast)),20),false
+       ), ARRAY[ST_Band(rast,2),ST_Band(rast,3)] ) from aerials.boston
+WHERE rid = 6;</programlisting>
+<informaltable>
+  <tgroup cols="2">
+       <tbody>
+         <row>
+               <entry><para><informalfigure>
+                       <mediaobject>
+                         <imageobject>
+                               <imagedata fileref="images/st_clip04.png" />
+                         </imageobject>
+                         <caption><para>Full raster tile before clipping</para></caption>
+                       </mediaobject>
+                 </informalfigure></para>
+                </entry>
+               <entry><para><informalfigure>
+                       <mediaobject>
+                         <imageobject>
+                               <imagedata fileref="images/st_clip05.png" />
+                         </imageobject>
+                         <caption><para>After Clipping - surreal</para></caption>
+                       </mediaobject>
+                 </informalfigure></para>
+                </entry>
+               </row>
+       </tbody>
+</tgroup>
 </informaltable>
                        </refsection>
                        <refsection>