Skip to main content
edited tags; edited title
Link
Dave
  • 347
  • 3
  • 9

Possible QGIS issue suggesting that PostGIS ST_Colormap inserting NULLDATA values in output during converstion of greyscale to colour raster

naming
Source Link
Vince
  • 20.3k
  • 16
  • 48
  • 65

postgis st_colormap PostGIS ST_Colormap inserting NULLDATA values in output during converstion of greyscale to colour raster

I am trying to convert an BNUI 255 greyscale image, with values 10-80 into a colour version using the postgisPostGIS extension(3.4) to postgresPostgres(16.2) using the following code

create table colour_ras as select st_colormap(rast,1,'bluered') as rast from wind_ras;

CREATE TABLE colour_ras AS 
    SELECT ST_Colormap(rast,1,'bluered') as rast
    FROM wind_ras;

The generate raster comes back as coloured version, with some extra holes which seem to set to the NOODATA value. These values match the 10 value in the original raster file.

I have tried different values for the range 10-80, I have tired different values of NODATA, nothing has changed. I know that the transformation between grayscale to colour maps the nodata value correctly because the original raster values are correctly copied.

Grayscale image as seen in Qgis

The colour image is the same size except for the white bits, which are black in the original

Colour image in Qgis

isIs there anything obvious that I am doing wrong ?

postgis st_colormap inserting NULLDATA values in output during converstion of greyscale to colour raster

I am trying to convert an BNUI 255 greyscale image, with values 10-80 into a colour version using the postgis extension(3.4) to postgres(16.2) using the following code

create table colour_ras as select st_colormap(rast,1,'bluered') as rast from wind_ras;

The generate raster comes back as coloured version, with some extra holes which seem to set to the NOODATA value. These values match the 10 value in the original raster file.

I have tried different values for the range 10-80, I have tired different values of NODATA, nothing has changed. I know that the transformation between grayscale to colour maps the nodata value correctly because the original raster values are correctly copied.

Grayscale image as seen in Qgis

The colour image is the same size except for the white bits, which are black in the original

Colour image in Qgis

is there anything obvious that I am doing wrong ?

PostGIS ST_Colormap inserting NULLDATA values in output during converstion of greyscale to colour raster

I am trying to convert an BNUI 255 greyscale image, with values 10-80 into a colour version using the PostGIS extension(3.4) to Postgres(16.2) using the following code

CREATE TABLE colour_ras AS 
    SELECT ST_Colormap(rast,1,'bluered') as rast
    FROM wind_ras;

The generate raster comes back as coloured version, with some extra holes which seem to set to the NOODATA value. These values match the 10 value in the original raster file.

I have tried different values for the range 10-80, I have tired different values of NODATA, nothing has changed. I know that the transformation between grayscale to colour maps the nodata value correctly because the original raster values are correctly copied.

Grayscale image as seen in Qgis

The colour image is the same size except for the white bits, which are black in the original

Colour image in Qgis

Is there anything obvious that I am doing wrong ?

Source Link
Dave
  • 347
  • 3
  • 9

postgis st_colormap inserting NULLDATA values in output during converstion of greyscale to colour raster

I am trying to convert an BNUI 255 greyscale image, with values 10-80 into a colour version using the postgis extension(3.4) to postgres(16.2) using the following code

create table colour_ras as select st_colormap(rast,1,'bluered') as rast from wind_ras;

The generate raster comes back as coloured version, with some extra holes which seem to set to the NOODATA value. These values match the 10 value in the original raster file.

I have tried different values for the range 10-80, I have tired different values of NODATA, nothing has changed. I know that the transformation between grayscale to colour maps the nodata value correctly because the original raster values are correctly copied.

Grayscale image as seen in Qgis

The colour image is the same size except for the white bits, which are black in the original

Colour image in Qgis

is there anything obvious that I am doing wrong ?