Hi<br><br>Below is a step-by-step of what I have done but I&#39;m getting an error when running v.rast.stats vector=catchments raster=rainfall layer=1 colprefix=area.<br><br><br>GRASS 6.4.0RC5+39438 (SRTMDEM):~ &gt; r.in.gdal in=/home/tgumede1/grassdata/Cape_Town/TRMMLast1day.tif out=rainfall<br>
<br>Projection of input dataset and current location appear to match<br> 100%<br>r.in.gdal complete. Raster map &lt;rainfall&gt; created.<br>GRASS 6.4.0RC5+39438 (SRTMDEM):~ &gt; g.region rast=rainfall -p<br>projection: 3 (Latitude-Longitude)<br>
zone:       0<br>datum:      wgs84<br>ellipsoid:  wgs84<br>north:      33:30S<br>south:      33:45S<br>west:       18:15E<br>east:       19E<br>nsres:      0:15<br>ewres:      0:15<br>rows:       1<br>cols:       3<br>cells:      3<br>
GRASS 6.4.0RC5+39438 (SRTMDEM):~ &gt; r.in.gdal in=/home/tgumede1/grassdata/Cape_Town/Dem_CF.tif out=dem target=SRTMDEM<br><br><br>Projection of input dataset and current location appear to match<br> 100%<br>r.in.gdal complete. Raster map &lt;dem&gt; created.<br>
GRASS 6.4.0RC5+39438 (SRTMDEM):~ &gt; g.region rast=dem -p<br>projection: 3 (Latitude-Longitude)<br>zone:       0<br>datum:      wgs84<br>ellipsoid:  wgs84<br>north:      33:40:46.499215S<br>south:      34:00:52.499215S<br>
west:       18:17:55.500436E<br>east:       19:10:16.500436E<br>nsres:      0:00:03<br>ewres:      0:00:03<br>rows:       402<br>cols:       1047<br>cells:      420894<br>GRASS 6.4.0RC5+39438 (SRTMDEM):~ &gt; r.watershed elevation=dem accumulation=acc drainage=direction basin=catch stream=str threshold=200<br>
<br><br>SECTION 1a (of 5): Initiating Memory.<br>SECTION 1b (of 5): Determining Offmap Flow.<br> 100%<br>SECTION 2: A * Search.<br> 100%<br>SECTION 3: Accumulating Surface Flow.<br> 100%<br>SECTION 4: Watershed determination.<br>
 100%<br>SECTION 5: Closing Maps.<br> 100%<br>GRASS 6.4.0RC5+39438 (SRTMDEM):~ &gt; r.to.vect -s in=catch out=catchments feature=area<br>Extracting areas...<br> 100%<br> 100%<br>Building topology for vector map &lt;catchments&gt;...<br>
Registering primitives...<br>60653 primitives registered<br>314051 vertices registered<br>Building areas...<br> 100%<br>19885 areas built<br>1 isles built<br>Attaching islands...<br> 100%<br>Attaching centroids...<br> 100%<br>
Number of nodes: 40769<br>Number of primitives: 60653<br>Number of points: 0<br>Number of lines: 0<br>Number of boundaries: 40768<br>Number of centroids: 19885<br>Number of areas: 19885<br>Number of isles: 1<br>r.to.vect complete.<br>
<br>GRASS 6.4.0RC5+39438 (SRTMDEM):~ &gt; v.rast.stats vector=catchments raster=rainfall layer=1 colprefix=precip<br><br>DBMI-DBF driver error:<br>SQL parser error: syntax error, unexpected NULL_VALUE processing &#39;NULL&#39;<br>
in statement:<br>UPDATE catchments SET precip_min=-NULL WHERE cat=10163<br>Error in db_execute_immediate()<br><br>ERROR: Error while executing: &#39;UPDATE catchments SET precip_min=-NULL WHERE<br>       cat=10163&#39;<br>
<br><br><br>Here is the output of gdalinfo TRMMLast1day.tif<br><br>Origin = (18.250000000000000,-33.500000000000000)<br>Pixel Size = (0.250000000000000,-0.250000000000000)<br><br>-------------------- coordinates--------------------------------------------<br>
Corner Coordinates:<br>Upper Left  (  18.2500000, -33.5000000) <br>Lower Left  (  18.2500000, -33.7500000) <br>Upper Right (  19.0000000, -33.5000000) <br>Lower Right (  19.0000000, -33.7500000) <br>Center      (  18.6250000, -33.6250000)<br>
<br><br>Here is what I did to clip the region of interest.<br><br>gdal_translate -a_srs EPSG:4326 -projwin 18.2987501 -33.6795831 19.1712501 -34.0141665 3B42RT.2010032900.1day.tif TRMMLast1day.tif<br><br><br>Is there something I have done wrong in these steps or there is something wrong with my coordinates?<br>
<br><br><br><div class="gmail_quote">2010/7/6  <span dir="ltr">&lt;<a href="mailto:micha@arava.co.il">micha@arava.co.il</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">&gt; Hi<br>
&gt;<br>
&gt; Is it wrong to use  -a_ullr option in gdal_translate to clip a small<br>
&gt; portion<br>
&gt; of the region from the big geotiff file region?<br>
&gt;<br>
<br>
</div>The option -a_ullr will change the georeference of the resulting file, so<br>
you could say it&#39;s &quot;wrong&quot; if you want to keep the original referencing.<br>
The way to clip a portion of the original and still maintain<br>
geo-referencing is with the -projwin option.<br>
<br>
--<br>
Micha<br>
<br>
&gt; --<br>
<div class="im">&gt; Kind Regards<br>
&gt; TS Gumede<br>
&gt; CSIR, Meraka Institute<br>
&gt; 072 258 1650<br>
&gt;<br>
</div>&gt; This mail was received via Mail-SeCure System.<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Kind Regards<br>TS Gumede<br>CSIR, Meraka Institute<br>072 258 1650<br><br>