2

Raster files in tiff format are storing into database.However I gets only an attribute table. Is there any way to retrieve pixel values/cell values in the table.

I have used raster2pgsql command for storing.

2

From the PostGIS manual, ST_Value() returns

... the value of a given band in a given columnx, rowy pixel or at a particular geometric point. Band numbers start at 1 and assumed to be 1 if not specified. If exclude_nodata_value is set to false, then all pixels include nodata pixels are considered to intersect and return value. If exclude_nodata_value is not passed in then reads it from metadata of raster.

Synopsis

double precision ST_Value
  (raster rast, geometry pt, boolean exclude_nodata_value=true);

double precision ST_Value
  (raster rast, integer bandnum, geometry pt, boolean exclude_nodata_value=true);

double precision ST_Value
  (raster rast, integer columnx, integer rowy, boolean exclude_nodata_value=true);

double precision ST_Value
  (raster rast, integer bandnum, integer columnx, integer rowy, boolean exclude_nodata_value=true);
  • I am not getting exact difference between ST_Value and ST_Valuecount – Padfoot Apr 16 '15 at 4:58
  • They're completely different: ST_Value returns individual value for a given pixel/point location. ST_Value returns pixel statistics regarding a given value. – Martin F Apr 17 '15 at 4:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.