From: Regina Obe Date: Mon, 26 Dec 2011 11:04:30 +0000 (+0000) Subject: example of resample X-Git-Tag: 2.0.0alpha1~296 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b2d830e3dea6f8daafc4054945cd82517fa04484;p=postgis example of resample git-svn-id: http://svn.osgeo.org/postgis/trunk@8579 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/html/images/st_resample01.png b/doc/html/images/st_resample01.png new file mode 100644 index 000000000..542ed20ec Binary files /dev/null and b/doc/html/images/st_resample01.png differ diff --git a/doc/html/images/st_resample02.png b/doc/html/images/st_resample02.png new file mode 100644 index 000000000..828fa4e3f Binary files /dev/null and b/doc/html/images/st_resample02.png differ diff --git a/doc/reference_raster.xml b/doc/reference_raster.xml index eb6141a39..6cfee8918 100644 --- a/doc/reference_raster.xml +++ b/doc/reference_raster.xml @@ -3468,18 +3468,54 @@ WHERE rid = 2; Warps a raster using specified pixel warping algorithm. 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. NearestNeighbor is the fastest but worst interpoloation + Only works if rasters are in a known spatial reference system Availability: 2.0.0 Requires GDAL 1.6.1+ Examples - -- TO DO -- + SELECT ST_Width(orig) As orig_width, ST_Width(reduce_100) As new_width + FROM ( + SELECT rast As orig, ST_Resample(rast,100,100) As reduce_100 + FROM aerials.boston + WHERE ST_Intersects(rast, + ST_Transform(ST_MakeEnvelope(-71.128, 42.2392,-71.1277, 42.2397, 4326),26986) ) limit 1 ) As foo; + orig_width | new_width +------------+------------- + 200 | 100 + + + + + + + + + + + original mass state plane meters (orig) + + + + + + + + + resampled from 200x200 to 100x100 + + + + + + + See Also - + ,