From: Regina Obe Date: Sat, 24 Dec 2011 20:18:26 +0000 (+0000) Subject: example for raster transform X-Git-Tag: 2.0.0alpha1~305 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=33eb6b8020017d334bbbf99884a5da06f8a50475;p=postgis example for raster transform git-svn-id: http://svn.osgeo.org/postgis/trunk@8570 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/html/images/rt_st_transform01.png b/doc/html/images/rt_st_transform01.png new file mode 100644 index 000000000..cdcd6d864 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 index 000000000..b6ff9970e Binary files /dev/null and b/doc/html/images/rt_st_transform02.png differ diff --git a/doc/reference_raster.xml b/doc/reference_raster.xml index f5d0ae080..94a8f1f3b 100644 --- a/doc/reference_raster.xml +++ b/doc/reference_raster.xml @@ -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. Algorithm options are: 'NearestNeighbor', 'Bilinear', 'Cubic', 'CubicSpline', and 'Lanczos'. Refer to: GDAL Warp resampling methods for more details. Availability: 2.0.0 Requires GDAL 1.6.1+ + 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 PROJSO and set it to libproj.dll (if you are using proj 4.6.1). You'll have to restart your PostgreSQL service/daemon after this change. Examples - -- TO DO -- + 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 + + + + + + + + + + + original mass state plane meters (mass_stm) + + + + + + + + + After transform to wgs 84 long lat (wgs_84) + + + + + + +