Hello Sandile
(Please keep messages on the list- maybe others can help...)
On 15/06/2010 10:52, Sandile Gumede wrote:
Hi
Below is the output of r.info
rainfall
Type of Map: raster Number of Categories:
1020
Data Type:
CELL
Rows:
480
Columns:
1440
Total Cells:
691200
Projection:
Latitude-Longitude
N: 33:40:46.49916S S: 34:20:55.49928S Res:
0:00:05.01875
E: 19:10:16.50036E W: 18:17:55.50036E Res:
0:00:02.18125
Range of data: min = 0 max =
1020
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.
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...)
Please give us the output of g.region -p.
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?
Regards,
Micha
Data
Description:
generated by
r.in.gdal
Comments:
r.in.gdal -o -e input="/home/tgumede1/grassdata/TRMMLast03HRS.tif"
output="rainfall" target="SRTMDEM"
And also the output of gdalinfo for the rainfall data:
Driver: GTiff/GeoTIFF
Files: TRMMLast03HRS.tif
Size is 1440, 480
Coordinate System is:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.2572235630016,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]
Origin = (18.298750099999999,-33.679583100000002)
Pixel Size = (0.000605902777778,-0.001394097291667)
Metadata:
AREA_OR_POINT=Area
TIFFTAG_DOCUMENTNAME=/TRMMRT/Pool/merged/gis/image/3B42RT.2010032900.03hr.tif
TIFFTAG_IMAGEDESCRIPTION=IDL TIFF file
TIFFTAG_SOFTWARE=IDL 6.1, Research Systems, Inc.
TIFFTAG_DATETIME=2010:03:29 04:53:11
TIFFTAG_XRESOLUTION=100
TIFFTAG_YRESOLUTION=100
TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Image Structure Metadata:
COMPRESSION=LZW
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 18.2987501, -33.6795831)
Lower Left ( 18.2987501, -34.3487498)
Upper Right ( 19.1712501, -33.6795831)
Lower Right ( 19.1712501, -34.3487498)
Center ( 18.7350001, -34.0141665)
Band 1 Block=256x256 Type=UInt16, ColorInterp=Gray
2010/6/15 Micha Silver <mi...@arava.co.il>
On 15/06/2010 09:51, Sandile Gumede wrote:
if I run r.info
-g rainfall, I get:
north=-33.679583
south=-34.34875
east=19.17125
west=18.29875
and if I run v.info
-g catchments, I get:
north=-33.6795831
south=-34.3487498
east=19.1712501
west=18.2987501
top=0.000000
bottom=0.000000
OK, now we see that the regions are identical.
I'd like to see also the full output of
r.info
rainfall
(it will give the max-min values of the raster) and also the output of
gdalinfo rainfall.tif (the original tiff file)
Perhaps then we can understand where the -NULL values are from?
2010/6/13 Micha Silver <mi...@arava.co.il>
(back on the ML)
Hi Sandile:
The error is popping up, apparently, because of the strange "-NULL"
value. What is -NULL??
Can you display the rainfall raster? Does it look OK (some value
everywhere?)
Perhaps run a check on the original rainfall.tif with gdalinfo to see
what range of values it is showing? Then do r.info rainfall to show
what range the GRASS raster has.
--
Micha
On 13/06/2010 12:13, Sandile Gumede wrote:
Hi,
Whats wrong with the rainfall data (rainfall.tif) if you get a DBMI-DBF
driver error when running v.rast.stats
vector=catchments
raster=rainfall
colprefix=precip?
SQL parser error: syntax error, unexpected NULL_VALUE processing 'NULL'
in statement:
UPDATE catchments SET precip_cf_=-NULL WHERE cat=2
Error in db_execute_immediate()
ERROR: Error while executing: 'UPDATE catchments SET precip_cf_=-NULL
WHERE
cat=2'
This mail was received via Mail-SeCure System.
--
Kind Regards
TS Gumede
CSIR, Meraka Institute
072 258 1650
This mail was received via Mail-SeCure System.
--
Micha Silver
http://www.surfaces.co.il/
Arava Development Co. +972-52-3665918
--
Kind Regards
TS Gumede
CSIR, Meraka Institute
072 258 1650
This mail was received via Mail-SeCure System.
--
Micha Silver
http://www.surfaces.co.il/
Arava Development Co. +972-52-3665918
|