<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE>RE: [GRASS-user] r.texture NULL value error</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>It seems that r.null missed some NULL values or some negative values are still there (one or both issues may be the cause).<BR>
<BR>
Anyway I worked around it by adding a fixed amount with the map calculator and rescaling it to the wanted scale.<BR>
<BR>
This workaround seems to be foolproof and confirms that there must be a NULL value or a negative value that is missed by the summary statistics and r.null causing r.texture to go into spasm.<BR>
<BR>
So, it's fixed and not fixed at the same time. Maybe I'll look into the code later.<BR>
<BR>
Cheers,<BR>
Koen<BR>
<BR>
<BR>
-----Oorspronkelijk bericht-----<BR>
Van: neteler.osgeo@gmail.com namens Markus Neteler<BR>
Verzonden: ma 24-11-2008 15:46<BR>
Aan: Hufkens Koen<BR>
CC: GRASS user list<BR>
Onderwerp: Re: [GRASS-user] r.texture NULL value error<BR>
<BR>
On Mon, Nov 24, 2008 at 2:39 PM, Hufkens Koen &lt;koen.hufkens@ua.ac.be&gt; wrote:<BR>
&gt; Hi list,<BR>
&gt;<BR>
&gt; I've been trying to run a r.texture filter on a map but I constantly get the<BR>
&gt; error:<BR>
&gt;<BR>
&gt; ERROR: Negative or no data pixel found. This module is not yet able to<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; process no data holes in a map, please fill with r.fillnulls or<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; other algorithms<BR>
&gt;<BR>
<BR>
I ran into this myself a few minutes ago :)<BR>
The trick is that *all* pixels in the current region are need to be<BR>
set to non-NULL.<BR>
If NULL pixels are present, r.texture fails.<BR>
<BR>
run<BR>
r.univar mapname<BR>
to see how many NULL cells are in the current region.<BR>
<BR>
Solution:<BR>
- either zoom into area without NULL pixels (won't always make sense)<BR>
- or fill the NULL areas with some value (various options)<BR>
- (or fix r.texture if possible).<BR>
<BR>
Markus<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>