Ticket #188 (closed task: fixed)

Opened 3 years ago

Last modified 22 months ago

[wktraster] Add a HasNoDataValue function

Reported by: pracine Owned by: pracine
Priority: high Milestone: WKTRaster 0.1.6
Component: raster Version: trunk
Keywords: Cc:

Description

We need a ST_HasNoDataValue() function in order to determine if the stored NoData? value is significant or not because it is not possible to store a null value (is it?)

Attachments

rt_hasnodata.patch Download (16.8 KB) - added by dzwarg 2 years ago.
Implementation of hasnodata flag in the c api.

Change History

Changed 3 years ago by mloskot

Any idea how are you going to implement it?

Are you going to use 4 spare bits of pixel type (see  RFC1-SerializedFormat ?

Changed 3 years ago by pracine

Only one. Is it possible to store a null value in the header using gdal2wktraster.py?

Changed 3 years ago by pracine

  • summary changed from Add a HasNoDataValue function to [wktraster]: Add a HasNoDataValue function

Changed 2 years ago by mloskot

  • summary changed from [wktraster]: Add a HasNoDataValue function to Add a HasNoDataValue function

Changed 2 years ago by mloskot

Pierre, do you mean header of the raster?

Yes, should be as we store various properties in header already (see wkblify_raster_header function).

Changed 2 years ago by mloskot

  • summary changed from Add a HasNoDataValue function to [wktraster] Add a HasNoDataValue function

Changed 2 years ago by pracine

  • version set to trunk
  • type changed from defect to task

Changed 2 years ago by pracine

  • status changed from new to assigned

Changed 2 years ago by dzwarg

I created a patch that adds:

  • rt_band_get_hasnodata_flag
  • rt_band_set_hasnodata_flag

To the c api. These have unit tests in the test/core folder, and I updated the RFC to note that the 2nd highest bit of the 'data' byte is occupied by the 'hasnodata' bit.

Changed 2 years ago by dzwarg

Implementation of hasnodata flag in the c api.

Changed 22 months ago by pracine

The function is implemented at the core and the PostGIS levels but gdal2wktraster.py remains to be modified to set the flag when it is needed.

Changed 22 months ago by pracine

  • status changed from assigned to closed
  • resolution set to fixed

Modified gdal2wktraster.py so now it sets the HasNodataValue? flag in the WKB.

Note: See TracTickets for help on using tickets.