]> granicus.if.org Git - postgis/commitdiff
Example of AddRasterColumn
authorRegina Obe <lr@pcorp.us>
Wed, 14 Apr 2010 14:09:45 +0000 (14:09 +0000)
committerRegina Obe <lr@pcorp.us>
Wed, 14 Apr 2010 14:09:45 +0000 (14:09 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5547 b70326c6-7e19-0410-871a-916f4a2858ee

doc/reference_wktraster.xml

index 2d432323b404c851e1bb6d9d28022a0c504e15d0..8b3c049b70c5281151c2cabf143c3e921d0b222a 100644 (file)
@@ -210,7 +210,23 @@ VALUES (1,
          <refsection>
                <title>Examples</title>
 
-               <programlisting><!-- TODO -->
+               <programlisting>SELECT AddRasterColumn('public', 'myrasters', 'rast',4326,
+    '{8BUI,8BUI,8BUI,8BUI}',
+false, true, '{255,255,255,255}', 0.25,-0.25,200,300, null);
+
+public.myrasters.rast 
+srid:4326 pixel_types:{8BUI,8BUI,8BUI,8BUI} 
+out_db:false 
+regular_blocking:true 
+nodata_values:'{255,255,255,255}' 
+pixelsize_x:'0.25' 
+pixelsize_y:'-0.25' blocksize_x:'200' blocksize_y:'300' extent:NULL
+
+--- After loading the data, you can currect the geometry column
+UPDATE raster_columns SET extent = (SELECT ST_Union(ST_Envelope(rast)) FROM myrasters)
+       WHERE r_table_schema = 'public'
+  AND r_table_name = 'myrasters'
+  AND r_column = 'rast';
                </programlisting>
          </refsection>