]> granicus.if.org Git - postgis/commitdiff
example for raster transform
authorRegina Obe <lr@pcorp.us>
Sat, 24 Dec 2011 20:18:26 +0000 (20:18 +0000)
committerRegina Obe <lr@pcorp.us>
Sat, 24 Dec 2011 20:18:26 +0000 (20:18 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8570 b70326c6-7e19-0410-871a-916f4a2858ee

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

diff --git a/doc/html/images/rt_st_transform01.png b/doc/html/images/rt_st_transform01.png
new file mode 100644 (file)
index 0000000..cdcd6d8
Binary files /dev/null and b/doc/html/images/rt_st_transform01.png differ
diff --git a/doc/html/images/rt_st_transform02.png b/doc/html/images/rt_st_transform02.png
new file mode 100644 (file)
index 0000000..b6ff997
Binary files /dev/null and b/doc/html/images/rt_st_transform02.png differ
index f5d0ae08002a13824295d3eb7f345e0898578121..94a8f1f3b60208c5142aac98eb4c84ab09f5aa4d 100644 (file)
@@ -3622,12 +3622,52 @@ SELECT descrip, ST_ScaleX(rast) As newsx, ST_ScaleY(rast) As newsy
                                    Uses 'NearestNeighbor' if no algorithm is specified and maxerror percent of 0.125 if no maxerr is specified.</para>
                                <para>Algorithm options are: 'NearestNeighbor', 'Bilinear', 'Cubic', 'CubicSpline', and 'Lanczos'.  Refer to: <ulink url="http://www.gdal.org/gdalwarp.html">GDAL Warp resampling methods</ulink> for more details.</para>
                                <para>Availability: 2.0.0  Requires GDAL 1.6.1+</para>
+                               <note><para>If you find your transformation support is not working right, you may need to set the environment variable PROJSO to the .so or .dll projection library
+                                       your PostGIS is using.  This just needs to have the name of the file. So for example on windows, you would in Control PAnel -> Environment Variables add a system variable called <varname>PROJSO</varname> and set it to <varname>libproj.dll</varname> (if you are using proj 4.6.1).  You'll have to restart your PostgreSQL service/daemon after this change.</para></note>
                        </refsection>
                                
                        <refsection>
                                        <title>Examples</title>
                                
-                                       <programlisting>-- TO DO --</programlisting>
+                                       <programlisting>SELECT ST_Width(mass_stm) As w_before, ST_Width(wgs_84) As w_after,
+                                               ST_Height(mass_stm) As h_before, ST_Height(wgs_84) As h_after
+                                               FROM 
+                                               ( SELECT rast As mass_stm, ST_Transform(rast,4326) As wgs_84
+                                               FROM aerials.o_2_boston 
+                                               WHERE ST_Intersects(rast,
+                                                       ST_Transform(ST_MakeEnvelope(-71.128, 42.2392,-71.1277, 42.2397, 4326),26986) )
+                                               LIMIT 1) As foo;
+                                               
+ w_before | w_after | h_before | h_after
+----------+---------+----------+---------
+      200 |     228 |      200 |     170
+                                       </programlisting>
+<informaltable>
+  <tgroup cols="2">
+       <tbody>
+         <row>
+               <entry><informalfigure>
+                       <mediaobject>
+                         <imageobject>
+                               <imagedata fileref="images/rt_st_transform01.png" />
+                         </imageobject>
+                         <caption><para>original mass state plane meters (mass_stm)</para></caption>
+                       </mediaobject>
+                 </informalfigure>
+                </entry>
+               <entry><informalfigure>
+                       <mediaobject>
+                         <imageobject>
+                               <imagedata fileref="images/rt_st_transform02.png" />
+                         </imageobject>
+                         <caption><para>After transform to wgs 84 long lat (wgs_84)</para></caption>
+                       </mediaobject>
+                 </informalfigure>
+                </entry>
+               </row>
+       </tbody>
+</tgroup>
+</informaltable>
                        </refsection>
 
                        <refsection>