[postgis-devel] PostGIS ST_Resample Issue

Birkett, Scott scott.birkett at pioneer.com
Fri Jun 8 14:31:04 PDT 2018


"PostgreSQL 9.5.10 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9), 64-bit POSTGIS="2.2.5 r15298" GEOS="3.5.1-CAPI-1.9.1 r4246" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 2.0.3, released 2016/07/01" LIBXML="2.9.1" LIBJSON="0 (...)"

The raster created by …
SELECT   '0100000200000000000000F03F000000000000F0BF00000000000000000000000000000000000000000000000000000000000000000000000002000200080000000000000000000000000000000000000000080000000001000000010000000100000001000000'::raster, is a two band raster with zeros in the first band and ones in the second band.

The following Resample works.
//////////////////////////////////////////

SELECT ST_Resample('0100000200000000000000F03F000000000000F0BF00000000000000000000000000000000000000000000000000000000000000000000000002000200080000000000000000000000000000000000000000080000000001000000010000000100000001000000'::raster, 2, 2)

//////////////////////////////////////////////

The following Resample does not work.
//////////////////////////////////////////

SELECT ST_Resample(ST_SetSRID('0100000200000000000000F03F000000000000F0BF00000000000000000000000000000000000000000000000000000000000000000000000002000200080000000000000000000000000000000000000000080000000001000000010000000100000001000000'::raster, 4326), 2, 2)

//////////////////////////////////////////////
Error Follows


ERROR:  rt_raster_gdal_warp: Could not create GDAL transformation object for output dataset creation



********** Error **********



ERROR: rt_raster_gdal_warp: Could not create GDAL transformation object for output dataset creation

SQL state: XX000


Is there something with the ST_Resample function that I am missing?  I don’t understand why setting the SRID to 4326 breaks ST_Resample in this instance.  ST_SetSRID for the above raster works fine, the raster is returned and the coordinates are valid for 4326.

Any help is appreciated.



This communication is for use by the intended recipient and contains information that may be Privileged, confidential or copyrighted under applicable law. If you are not the intended recipient, you are hereby formally notified that any use, copying or distribution of this e-mail,in whole or in part, is strictly prohibited. Please notify the sender by return e-mail and delete this e-mail from your system. Unless explicitly and conspicuously designated as "E-Contract Intended", this e-mail does not constitute a contract offer, a contract amendment, or an acceptance of a contract offer. This e-mail does not constitute a consent to the use of sender's contact information for direct marketing purposes or for transfers of data to third parties. Francais Deutsch Italiano Espanol Portugues Japanese Chinese Korean http://www.DuPont.com/corp/email_disclaimer.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20180608/9f7ed5b6/attachment.html>


More information about the postgis-devel mailing list