r.external - was: Re: [GRASS-dev] some questions about future development

On Wed, Aug 20, 2008 at 4:03 PM, Glynn Clements
<glynn@gclements.plus.com> wrote:

Glynn Clements wrote:

Known issues at present:

Null support is missing (r.external records any null value reported by
GDAL, but G_get_raster_row() etc ignore it; I suspect that it will
treat zero as null due to the absence of a null file).

Null support has been added.

I have now tested (in my local 6.4 backport) a shaded terrain map (GeoTIFF).
The 0 pixels are registered as NULL pixels, leading to white areas instead
of black in case of cast terrain shadow.

So I confirm that zero is treated as NULL now.
Could the GDAL Null value be used instead?

gdalinfo /home/neteler/data/maps/srtm/srtm_alps_LCC_hillshaded.tif | tail -n 2
Band 1 Block=8378x1 Type=Byte, ColorInterp=Gray
  NoData Value=-9999

The function is according to gdalinfo.c:

double dfNoData;
int bGotNodata;
dfNoData = GDALGetRasterNoDataValue( hBand, &bGotNodata );

thanks,
Markus

Markus Neteler wrote:

>> Null support is missing (r.external records any null value reported by
>> GDAL, but G_get_raster_row() etc ignore it; I suspect that it will
>> treat zero as null due to the absence of a null file).
>
> Null support has been added.

I have now tested (in my local 6.4 backport) a shaded terrain map (GeoTIFF).
The 0 pixels are registered as NULL pixels, leading to white areas instead
of black in case of cast terrain shadow.

So I confirm that zero is treated as NULL now.
Could the GDAL Null value be used instead?

Null support was added in r32924, and seems to work.

--
Glynn Clements <glynn@gclements.plus.com>

On Thu, Aug 21, 2008 at 11:00 AM, Glynn Clements
<glynn@gclements.plus.com> wrote:

Markus Neteler wrote:

>> Null support is missing (r.external records any null value reported by
>> GDAL, but G_get_raster_row() etc ignore it; I suspect that it will
>> treat zero as null due to the absence of a null file).
>
> Null support has been added.

I have now tested (in my local 6.4 backport) a shaded terrain map (GeoTIFF).
The 0 pixels are registered as NULL pixels, leading to white areas instead
of black in case of cast terrain shadow.

So I confirm that zero is treated as NULL now.
Could the GDAL Null value be used instead?

Null support was added in r32924, and seems to work.

Ha - I missed to backport this one.

Excellent, it now works fine in my local backport, too.

So: any objections to submit this new feature/module?

Markus

Markus Neteler wrote:

>> >> Null support is missing (r.external records any null value reported by
>> >> GDAL, but G_get_raster_row() etc ignore it; I suspect that it will
>> >> treat zero as null due to the absence of a null file).
>> >
>> > Null support has been added.
>>
>> I have now tested (in my local 6.4 backport) a shaded terrain map (GeoTIFF).
>> The 0 pixels are registered as NULL pixels, leading to white areas instead
>> of black in case of cast terrain shadow.
>>
>> So I confirm that zero is treated as NULL now.
>> Could the GDAL Null value be used instead?
>
> Null support was added in r32924, and seems to work.

Ha - I missed to backport this one.

Excellent, it now works fine in my local backport, too.

So: any objections to submit this new feature/module?

Is it really wise to include it in 6.4?

At a minimum, we should probably add some more checks so that versions
built without this feature fail more gracefully (i.e. produce a more
useful error message).

--
Glynn Clements <glynn@gclements.plus.com>