[postgis-users] no pixels in raster

Peter Tittmann ptittmann at gmail.com
Tue Apr 19 13:03:43 PDT 2016


Hi All,

First off:

SELECT version() || ' ' 
 || postgis_full_version();

                                                                                                                                      ?column?                                                                                                                                       
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 PostgreSQL 9.5.1 on x86_64-apple-darwin15.3.0, compiled by Apple LLVM version 7.0.2 (clang-700.1.81), 64-bit POSTGIS="2.2.1 r14555" GEOS="3.5.0-CAPI-1.9.0 r4084" PROJ="Rel. 4.9.2, 08 September 2015" GDAL="GDAL 1.11.3, released 2015/09/16" LIBXML="2.9.3" LIBJSON="0.12" RASTER
(1 row)

I impor rasters via raster2pgsql:

raster2pgsql  -d -s 26910 cye_h_utm.tif | psql -d <dbname>

resulting in:

Processing 1/1: cye_h_utm.tif
BEGIN
NOTICE:  table "cye_h_utm" does not exist, skipping
DROP TABLE
CREATE TABLE
INSERT 0 1
COMMIT

I can get st_pixelascentroid to produce a valid point geometry.

I can view the raster in QGIS using the DBManager with valid range of values and spatial attributes.

However, st_count() results in 0 pixels:

 select st_count(rast,1) from cye_l_utm;
 st_count 
----------
        0

And none of the pixel accessors seem to register pixels.

Any help would be much appreciated.

Peter


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20160419/f80a97d3/attachment.html>


More information about the postgis-users mailing list