[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    [postgis-users] no pixels in raster
From:       Peter Tittmann <ptittmann () gmail ! com>
Date:       2016-04-19 20:03:43
Message-ID: 2E5A7473-C1EB-42F1-BA8B-12F8B4ADC915 () gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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


[Attachment #5 (unknown)]

<html><head><meta http-equiv="Content-Type" content="text/html \
charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: \
space; -webkit-line-break: after-white-space;" class="">Hi All,<div class=""><br \
class=""></div><div class="">First off:</div><div class=""><br class=""></div><div \
class=""><div class="">SELECT version() || ' '&nbsp;</div><div class="">&nbsp;|| \
postgis_full_version();</div><div class=""><br class=""></div><div class="">&nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ?column? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp;&nbsp;</div><div \
class="">----------------------------------------------------------------------------- \
-------------------------------------------------------------------------------------- \
------------------------------------------------------------------------------------------------------------------</div><div \
class="">&nbsp;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</div><div class="">(1 row)</div></div><div \
class=""><br class=""></div><div class="">I impor rasters via raster2pgsql:</div><div \
class=""><br class=""></div><div class="">raster2pgsql &nbsp;-d -s 26910 \
cye_h_utm.tif | psql -d &lt;dbname&gt;</div><div class=""><br class=""></div><div \
class="">resulting in:</div><div class=""><br class=""></div><div class=""><div \
class="">Processing 1/1: cye_h_utm.tif</div><div class="">BEGIN</div><div \
class="">NOTICE: &nbsp;table "cye_h_utm" does not exist, skipping</div><div \
class="">DROP TABLE</div><div class="">CREATE TABLE</div><div class="">INSERT 0 \
1</div><div class="">COMMIT</div></div><div class=""><br class=""></div><div \
class="">I can get st_pixelascentroid to produce a valid point geometry.</div><div \
class=""><br class=""></div><div class="">I can view the raster in QGIS using the \
DBManager with valid range of values and spatial attributes.</div><div class=""><br \
class=""></div><div class="">However, st_count() results in 0 pixels:</div><div \
class=""><br class=""></div><div class=""><div style="margin: 0px; line-height: \
normal;" class=""><div style="margin: 0px; line-height: normal;" class=""><font \
face="Helvetica Neue" class="">&nbsp;select st_count(rast,1) from \
cye_l_utm;</font></div><div style="margin: 0px; line-height: normal;" class=""><font \
face="Helvetica Neue" class="">&nbsp;st_count&nbsp;</font></div><div style="margin: \
0px; line-height: normal;" class=""><font face="Helvetica Neue" class=""><b \
class="">----------</b></font></div><div style="margin: 0px; line-height: normal;" \
class=""><font face="Helvetica Neue" class=""><b class="">&nbsp; &nbsp; &nbsp; &nbsp; \
0</b></font></div><div style="margin: 0px; line-height: normal;" class=""><font \
face="Helvetica Neue" class=""><b class=""><br class=""></b></font></div><div \
style="margin: 0px; line-height: normal;" class=""><font face="Helvetica Neue" \
class="">And none of the pixel accessors seem to register pixels.</font></div><div \
style="margin: 0px; line-height: normal;" class=""><font face="Helvetica Neue" \
class=""><br class=""></font></div><div style="margin: 0px; line-height: normal;" \
class=""><font face="Helvetica Neue" class="">Any help would be much \
appreciated.</font></div><div style="margin: 0px; line-height: normal;" \
class=""><font face="Helvetica Neue" class=""><br class=""></font></div><div \
style="margin: 0px; line-height: normal;" class=""><font face="Helvetica Neue" \
class="">Peter</font></div><div style="margin: 0px; line-height: normal;" \
class=""><font face="Helvetica Neue" class=""><b class=""><br \
class=""></b></font></div></div></div><div class=""><br class=""></div></body></html>


[Attachment #6 (text/plain)]

_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/postgis-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic