Opened 15 years ago

Closed 15 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 15 years ago.
Implementation of hasnodata flag in the c api.

Download all attachments as: .zip

Change History (12)

comment:1 by mloskot, 15 years ago

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 by pracine, 15 years ago

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

comment:3 by pracine, 15 years ago

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

comment:4 by mloskot, 15 years ago

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

comment:5 by mloskot, 15 years ago

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 by mloskot, 15 years ago

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

comment:7 by pracine, 15 years ago

Type: defecttask
Version: trunk

comment:8 by pracine, 15 years ago

Status: newassigned

comment:9 by dzwarg, 15 years ago

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.

by dzwarg, 15 years ago

Attachment: rt_hasnodata.patch added

Implementation of hasnodata flag in the c api.

comment:10 by pracine, 15 years ago

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 by pracine, 15 years ago

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.