Opened 11 years ago

Closed 11 years ago

#188 closed task (fixed)

[wktraster] Add a HasNoDataValue function

Reported by: pracine Owned by: pracine
Priority: high Milestone: WKTRaster 0.1.6
Component: raster Version: master
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 (1)

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

Download all attachments as: .zip

Change History (12)

comment:1 Changed 11 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 ?

comment:2 Changed 11 years ago by pracine

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

comment:3 Changed 11 years ago by pracine

Summary: Add a HasNoDataValue function[wktraster]: Add a HasNoDataValue function

comment:4 Changed 11 years ago by mloskot

Summary: [wktraster]: Add a HasNoDataValue functionAdd a HasNoDataValue function

comment:5 Changed 11 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).

comment:6 Changed 11 years ago by mloskot

Summary: Add a HasNoDataValue function[wktraster] Add a HasNoDataValue function

comment:7 Changed 11 years ago by pracine

Type: defecttask
Version: trunk

comment:8 Changed 11 years ago by pracine

Status: newassigned

comment:9 Changed 11 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 11 years ago by dzwarg

Attachment: rt_hasnodata.patch added

Implementation of hasnodata flag in the c api.

comment:10 Changed 11 years 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.

comment:11 Changed 11 years ago by pracine

Resolution: fixed
Status: assignedclosed

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

Note: See TracTickets for help on using tickets.