[GRASS-dev] Re: r.external
Markus Neteler
neteler at osgeo.org
Sun Sep 14 01:56:23 EDT 2008
On Sun, Sep 14, 2008 at 1:06 AM, Glynn Clements
<glynn at gclements.plus.com> wrote:
> Markus Neteler wrote:
>
>> So the range (slightly incorrect) survives, but G_write_fp_range()
>> isn't writing it out.
>
> Okay; I think that r33435 should fix it:
>
> --- raster/r.external/main.c (revision 33434)
> +++ raster/r.external/main.c (working copy)
> @@ -454,12 +454,14 @@
> struct Range range;
> range.min = (CELL)info->range[0];
> range.max = (CELL)info->range[1];
> + range.first_time = 0;
> G_write_range(output, &range);
> }
> else {
> struct FPRange fprange;
> fprange.min = info->range[0];
> fprange.max = info->range[1];
> + fprange.first_time = 0;
> G_write_fp_range(output, &fprange);
> write_fp_format(output, info);
> write_fp_quant(output);
Yes, it solved the problem. Backported to 6.4.svn.
> I'm assuming that the inaccuracy in the range is due to the lack of
> the -r flag. Without that flag, GDAL calculates an approximate range
> from a sampling of cells, rather than processing the entire map.
Using the -r flag helps certainly, too:
r.info -r pat_dtm_5m
WARNING: category support for [pat_dtm_5m] in mapset [PERMANENT] missing
min=0.000000
max=3758.871094
Thanks again for this great module and assistance (so I can avoid to
by another terabyte for my imported (now linked) provincial geodata.
Markus
More information about the grass-dev
mailing list