<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=windows-1255"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello Sandile<br>
(Please keep messages on the list- maybe others can help...)<br>
<br>
<br>
On 15/06/2010 10:52, Sandile Gumede wrote:
<blockquote
cite="mid:AANLkTinDByhQNqz2_WM1CBzrdbGeF_AQFZOaniTkOPsj@mail.gmail.com"
type="cite">Hi<br>
<br>
Below is the output of <a moz-do-not-send="true" href="http://r.info">r.info</a>
rainfall<br>
<br>
Type of Map: raster Number of Categories:
1020 <br>
Data Type:
CELL <br>
Rows:
480 <br>
Columns:
1440 <br>
Total Cells:
691200 <br>
Projection:
Latitude-Longitude <br>
N: 33:40:46.49916S S: 34:20:55.49928S Res:
0:00:05.01875 <br>
E: 19:10:16.50036E W: 18:17:55.50036E Res:
0:00:02.18125 <br>
Range of data: min = 0 max =
1020 <br>
<br>
</blockquote>
The only unusual thing I notice above is that the resolution settings
for the raster are different N-S and E-W. This came from the original
tiff (see below) which also has rectangular pixels, and your use of the
"-o" option when importing. <br>
I wonder if that's what is causing your problems with v.rast.stats??
(the v.rast.stats module creates a temp raster at the *current region's
resolution* settings, which might be different from this rainfall
raster's rectangular resolution...)<br>
<br>
Please give us the output of g.region -p. <br>
<br>
Perhaps someone with more experience can answer: If v.rast.stats runs
using a raster with resolution different from the current region
settings what will happen?<br>
<br>
Regards,<br>
Micha<br>
<br>
<blockquote
cite="mid:AANLkTinDByhQNqz2_WM1CBzrdbGeF_AQFZOaniTkOPsj@mail.gmail.com"
type="cite">
<br>
Data
Description: <br>
generated by
r.in.gdal <br>
<br>
Comments:
<br>
r.in.gdal -o -e input="/home/tgumede1/grassdata/TRMMLast03HRS.tif"
output="rainfall" target="SRTMDEM"<br>
<br>
<br>
<br>
And also the output of gdalinfo for the rainfall data:<br>
<br>
Driver: GTiff/GeoTIFF<br>
Files: TRMMLast03HRS.tif<br>
Size is 1440, 480<br>
Coordinate System is:<br>
GEOGCS["WGS 84",<br>
DATUM["WGS_1984",<br>
SPHEROID["WGS 84",6378137,298.2572235630016,<br>
AUTHORITY["EPSG","7030"]],<br>
AUTHORITY["EPSG","6326"]],<br>
PRIMEM["Greenwich",0],<br>
UNIT["degree",0.0174532925199433],<br>
AUTHORITY["EPSG","4326"]]<br>
Origin = (18.298750099999999,-33.679583100000002)<br>
Pixel Size = (0.000605902777778,-0.001394097291667)<br>
Metadata:<br>
AREA_OR_POINT=Area<br>
TIFFTAG_DOCUMENTNAME=/TRMMRT/Pool/merged/gis/image/3B42RT.2010032900.03hr.tif<br>
TIFFTAG_IMAGEDESCRIPTION=IDL TIFF file<br>
TIFFTAG_SOFTWARE=IDL 6.1, Research Systems, Inc.<br>
TIFFTAG_DATETIME=2010:03:29 04:53:11<br>
TIFFTAG_XRESOLUTION=100<br>
TIFFTAG_YRESOLUTION=100<br>
TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)<br>
Image Structure Metadata:<br>
COMPRESSION=LZW<br>
INTERLEAVE=BAND<br>
Corner Coordinates:<br>
Upper Left ( 18.2987501, -33.6795831) <br>
Lower Left ( 18.2987501, -34.3487498) <br>
Upper Right ( 19.1712501, -33.6795831) <br>
Lower Right ( 19.1712501, -34.3487498) <br>
Center ( 18.7350001, -34.0141665) <br>
Band 1 Block=256x256 Type=UInt16, ColorInterp=Gray<br>
<br>
<br>
<br>
<div class="gmail_quote">2010/6/15 Micha Silver <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:micha@arava.co.il">micha@arava.co.il</a>></span><br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
<div class="im">On 15/06/2010 09:51, Sandile Gumede wrote:
<blockquote type="cite">if I run <a moz-do-not-send="true"
href="http://r.info" target="_blank">r.info</a>
-g rainfall, I get:<br>
<br>
north=-33.679583<br>
south=-34.34875<br>
east=19.17125<br>
west=18.29875<br>
<br>
and if I run <a moz-do-not-send="true" href="http://v.info"
target="_blank">v.info</a>
-g catchments, I get:<br>
<br>
north=-33.6795831<br>
south=-34.3487498<br>
east=19.1712501<br>
west=18.2987501<br>
top=0.000000<br>
bottom=0.000000<br>
<br>
</blockquote>
</div>
OK, now we see that the regions are identical.<br>
I'd like to see also the full output of <br>
<a moz-do-not-send="true" href="http://r.info" target="_blank">r.info</a>
rainfall<br>
(it will give the max-min values of the raster) and also the output of <br>
gdalinfo rainfall.tif (the original tiff file)<br>
Perhaps then we can understand where the -NULL values are from?
<div>
<div class="h5"><br>
<br>
<blockquote type="cite"><br>
<br>
<div class="gmail_quote">2010/6/13 Micha Silver <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:micha@arava.co.il" target="_blank">micha@arava.co.il</a>></span><br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">(back on the ML)<br>
<br>
Hi Sandile:<br>
The error is popping up, apparently, because of the strange "-NULL"
value. What is -NULL??<br>
Can you display the rainfall raster? Does it look OK (some value
everywhere?)<br>
<br>
Perhaps run a check on the original rainfall.tif with gdalinfo to see
what range of values it is showing? Then do <a moz-do-not-send="true"
href="http://r.info" target="_blank">r.info</a> rainfall to show
what range the GRASS raster has.<br>
<br>
-- <br>
<font color="#888888">Micha</font>
<div>
<div><br>
<br>
On 13/06/2010 12:13, Sandile Gumede wrote: </div>
</div>
<blockquote type="cite">
<div>
<div>Hi, <br>
<br>
Whats wrong with the rainfall data (rainfall.tif) if you get a DBMI-DBF
driver error when running v<span style="color: rgb(204, 0, 0);">.rast.stats
vector=catchments
raster=rainfall
colprefix=precip</span>?<br>
<br>
SQL parser error: syntax error, unexpected NULL_VALUE processing 'NULL'<br>
in statement:<br>
UPDATE catchments SET precip_cf_=-NULL WHERE cat=2<br>
Error in db_execute_immediate()<br>
<br>
ERROR: Error while executing: 'UPDATE catchments SET precip_cf_=-NULL
WHERE<br>
cat=2'<br>
<br>
</div>
</div>
<div>This mail was received via Mail-SeCure System.<br>
</div>
</blockquote>
<div><br>
<br>
<pre cols="62">--
Micha Silver
<a moz-do-not-send="true" href="http://www.surfaces.co.il/"
target="_blank">http://www.surfaces.co.il/</a>
Arava Development Co. +972-52-3665918
</pre>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <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>
</blockquote>
<br>
<br>
<pre cols="62">--
Micha Silver
<a moz-do-not-send="true" href="http://www.surfaces.co.il/"
target="_blank">http://www.surfaces.co.il/</a>
Arava Development Co. +972-52-3665918
</pre>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <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>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="62">--
Micha Silver
<a class="moz-txt-link-freetext" href="http://www.surfaces.co.il/">http://www.surfaces.co.il/</a>
Arava Development Co. +972-52-3665918
</pre>
</body>
</html>