[GRASS-user] Error while exporting

Glynn Clements glynn at gclements.plus.com
Wed May 18 04:29:47 EDT 2011


Markus Metz wrote:

> >> The NULL value of the reclass map is not recognized as NULL value, but
> >> instead treated as a valid number.
> >>
> >> This seems to be a bug in the GRASS library, specifically in
> >> G_get_null_value_row() and has probably been around since GRASS 6.3.
> >
> > AFAICT, it has been around as long as G_get_null_value_row() has
> > existed. G_get_null_value_row() returns the raw data, without any
> > reclass applied.
> >
> > As it stands, this function probably isn't of much use.
> 
> Remove?

No, fix (as per r46323).

If you only care about whether a cell is null or non-null, reading and
decoding the actual data is needless overhead.

If you need to read the data anyhow, then use that rather than reading
the null data a second time (the raw data is cached, but conversion
and masking will be re-done).

r.out.gdal was the latter case, so it shouldn't have been using that
function. OGSF is also the latter case, and should be fixed. 

r.neighbors is the former case (it's used for the the selection=
parameter), so it should be using Rast_get_null_value_row(). There may
be other modules which should be doing this but are actually reading
the data.

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


More information about the grass-user mailing list