<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 07/22/2010 10:55 AM, Sandile Gumede wrote:
<blockquote
cite="mid:AANLkTilkWEpRqchG9WlFVVy4zklhFHnkBV6BsWVAFbDx@mail.gmail.com"
type="cite">Hi<br>
How do you remove null cells, I guess that is what's causing the
problem.<br>
</blockquote>
Sandile:<br>
If I remember your project details, I think that the problem is not the
null cells in your rainfall data, but rather the very small catchment
polygons, some of which fall *totally* within a single rainfall cell
which has a null value.<br>
<blockquote
cite="mid:AANLkTilkWEpRqchG9WlFVVy4zklhFHnkBV6BsWVAFbDx@mail.gmail.com"
type="cite"><br>
r.to.vect complete.<br>
</blockquote>
I guess this step is your conversion of basins to a polygon vector map?
How many polygons are you getting? Check with v.info. What size are
they? <br>
v.db.addcol catchments col="area_sqm double precision"<br>
v.to.db catchments opt=area col=area_sqm units=me<br>
<br>
And please remind us of the resolution of the rainfall raster with:<br>
r.info rainfall <br>
<blockquote
cite="mid:AANLkTilkWEpRqchG9WlFVVy4zklhFHnkBV6BsWVAFbDx@mail.gmail.com"
type="cite">GRASS 6.4.0svn (SRTMDEM):~ > r.univar rainfall 100%<br>
total null and non-null cells: 12967201<br>
total null cells: 7202<br>
<br>
Of the non-null cells:<br>
----------------------<br>
n: 12959999<br>
minimum: 0<br>
maximum: 36<br>
range: 36<br>
mean: 4.99965<br>
mean of absolute values: 4.99965<br>
standard deviation: 9.57207<br>
variance: 91.6246<br>
variation coefficient: 191.455 %<br>
sum: 64795464<br>
<br>
GRASS 6.4.0svn (SRTMDEM):~ > v.rast.stats vect=catchments
rast=rainfall colprefix=precip<br>
Processing data (16 categories)...<br>
Updating the database ...<br>
DBMI-DBF driver error:<br>
SQL parser error: syntax error processing 'NULL'<br>
in statement:<br>
UPDATE catchments SET precip_cf_=-NULL WHERE cat=10728<br>
Error in db_execute_immediate()<br>
<br>
ERROR: Error while executing: 'UPDATE catchments SET precip_cf_=-NULL
WHERE<br>
cat=10728'<br>
<br clear="all">
<br>
</blockquote>
Another suggestion: One of the catchment polygons that is failing above
has cat value 10728. How about extracting just that single polygon,
then display it on a map together with the rainfall raster to see where
it falls? <br>
# extract<br>
v.extract catchments out=catch_10728 where="cat=10728"<br>
# Display<br>
g.region rast=rainfall<br>
d.rast rainfall<br>
d.vect catch_10728<br>
<br>
-- <br>
cheers,<br>
Micha<br>
<blockquote
cite="mid:AANLkTilkWEpRqchG9WlFVVy4zklhFHnkBV6BsWVAFbDx@mail.gmail.com"
type="cite">-- <br>
Kind Regards<br>
TS Gumede<br>
CSIR, Meraka Institute<br>
072 258 1650<br>
<br>
<br>
This mail was received via Mail-SeCure System.<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
grass-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a>
This mail was received via Mail-SeCure System.
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Micha Silver
Arava Development Co. +972-52-3665918
<a class="moz-txt-link-freetext" href="http://surfaces.co.il">http://surfaces.co.il</a>
</pre>
</body>
</html>