Dear Nick,
<br><br>I am working on SRTM rasters of resolution 1km, 500m, 250m and 
recently 90m using GRASS for long and had countered the problem being 
faced by you.
<br><br>My workaround is given below and as a by-product you may get a very nice coastline vector/raster also.
<br><br>1. I have converted  all the nulls with r.mapcalc to -160 using the formula C=if(A, if(isnull(B),-160,B))
<br>Where,
<br>A: region of interest
<br>B: original srtm raster with nulls for sea and holes
<br>C: Output map in which nulls have been converted to -160. 
<br><br>(Why -160, because in my map, as from my human memory, the 
lowest value was -70. I just chose a value lower than this value. We 
will need it later on to convert back them as holes for r.fillnulls to 
work upon.)
<br><br>A sample from the history file of the raster is produced below:
<br><br>Sun Aug  1 17:49:10 2010
<br>test5
<br>PERMANENT
<br>pks
<br>raster
<br><br><br>generated by r.mapcalc
<br>if(test_nL_region@PERMANENT, if(isnull(ib2@PERMANENT), -160, ib2@PERMANENT))
<br><br><br>A: test_nL_region
<br><br>This raster map is a region of my interest out the big srtm 
raster converted from a vector. Grass has a command , which converts the
 current region to a vector file.
<br>Again, the sample from the history file of the raster is produced below:
<br><br>ed Jul 28 10:09:42 2010
<br>test_nL_region
<br>PERMANENT
<br>pks
<br>raster
<br>Vector Map: nL_region@PERMANENT in mapset PERMANENT
<br>Original scale from vector map: 1:1
<br>generated by v.to.rast
<br>v.to.rast input=&quot;nL_region@PERMANENT&quot; output=&quot;test_nL_region&quot; use=&quot;c\
<br>at&quot; type=&quot;point,line,area&quot; layer=1 value=1 rows=4096
<br><br>nL_region:
<br>Again, the sample from the history file of the vector is produced below:
<br>COMMAND: v.in.region output=&quot;nL_region&quot; type=&quot;area&quot; cat=1
<br>GISDBASE: /home/pks/renamed_grassdata
<br>LOCATION: newLocation MAPSET: PERMANENT USER: pks DATE: Wed Jul 28 09:53:43 2010
<br><br>So, now we have -160s all around , i.e. the sea and holes on land.
<br><br>Now use the r.reclass.area feature to differentiate sea from  holes on land. A sample from my recent work is given below:
<br><br>Tue Nov  8 13:55:47 2011
<br>bi_reclassed3_area.recl
<br>work2
<br>rdcgis1
<br>reclass
<br>Reclassified map based on:
<br>  Map [bi_reclassed3.clump.bi_reclassed3_area] in mapset [work2]
<br>generated by r.reclass
<br><br>I am using GRASS7 and in the history given above , all the parameters are not available.
<br>In my case , I used 1 billion hectare as &quot;greater than area&quot; 
parameter to bring out the sea , land , and holes in land in different 
categories.
<br><br>Thereafter, use mask and pick up the landmass with holes in land , which you want to fill. 
<br>Just remember to convert back the -160 to null again.
<br><br>I felt that r.fillnulls works best when the nulls have values around them.
<br><br>By the way, CGIAR provides holes-filled-SRTM-raster.You may like
 to read their literature for understanding the algorithms used to fill 
the nulls. It&#39;s good and useful.
<br><br>Try this link for downloading clean rasters of your area of interest:
<br><br><a href="http://srtm.csi.cgiar.org/SELECTION/inputCoord.asp" target="_top" rel="nofollow">http://srtm.csi.cgiar.org/SELECTION/inputCoord.asp</a><br><br>Hope, it helps.
<br><br>Some of my observations are listed below:
<br>1. If the system lacks RAM, then  increase patience.
<br>2. If the system lacks hard-disk space, don&#39;t go for GIS.
<br>3. Learn python.
        
                                        <br><br><div class="gmail_quote">On Fri, Dec 2, 2011 at 5:37 AM,  <span dir="ltr">&lt;<a href="mailto:grass-user-request@lists.osgeo.org">grass-user-request@lists.osgeo.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Send grass-user mailing list submissions to<br>
        <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:grass-user-request@lists.osgeo.org">grass-user-request@lists.osgeo.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:grass-user-owner@lists.osgeo.org">grass-user-owner@lists.osgeo.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of grass-user digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
   1. Re: r.fillnulls for large area (Nick Jachowski)<br>
   2. topology model resume (and some proposals) (G. Allegri)<br>
   3. Re: [GRASS-dev] Should v.in.ogr clean topology by default ?<br>
      (Hamish)<br>
   4. Re: r.fillnulls for large area (Hamish)<br>
   5. Re: r.fillnulls for large area (Marcello Gorini)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 2 Dec 2011 00:07:07 +0700<br>
From: Nick Jachowski &lt;<a href="mailto:njachowski@gmail.com">njachowski@gmail.com</a>&gt;<br>
Subject: Re: [GRASS-user] r.fillnulls for large area<br>
To: Hamish &lt;<a href="mailto:hamish_b@yahoo.com">hamish_b@yahoo.com</a>&gt;<br>
Cc: <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
Message-ID:<br>
        &lt;<a href="mailto:CAPFL4TFhef32rraoch_%2B29xet8xWm6-B4sWYtva1qKi4GDC7qQ@mail.gmail.com">CAPFL4TFhef32rraoch_+29xet8xWm6-B4sWYtva1qKi4GDC7qQ@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
Hi Hamish,<br>
<br>
Thanks for the advice to fill the ocean with zeros. It worked better, and<br>
didn&#39;t get &quot;killed&quot;, but it still didn&#39;t work...This time it made it<br>
further than before, but it got &quot;abondoned&quot; - see the output below...<br>
<br>
Maybe I need to split my region into subregions and run r.fillnulls on each<br>
subregion then patch them together. If anybody has a better idea I would be<br>
grateful to know.<br>
<br>
Thanks!<br>
Nick<br>
<br>
GRASS 6.4.1 (seasia_ll):~ &gt; r.fillnulls in=srtmm0 out=srtmm0f<br>
Locating and isolating NULL areas...<br>
 100%<br>
Reading input raster map &lt;r_fillnulls_18931@PERMANENT&gt;...<br>
 100%<br>
Finding buffer zones...<br>
 100%<br>
Writing output raster map &lt;r_fillnulls_18931.buf&gt;...<br>
 100%<br>
 100%<br>
Creating interpolation points...<br>
Extracting points...<br>
 100%<br>
Building topology for vector map &lt;vecttmp_fillnulls_18931&gt;...<br>
Registering primitives...<br>
13428068 primitives registered<br>
13428068 vertices registered<br>
Building areas...<br>
 100%<br>
0 areas built<br>
0 isles built<br>
Attaching islands...<br>
Attaching centroids...<br>
 100%<br>
Number of nodes: 13428068<br>
Number of primitives: 13428068<br>
Number of points: 13428068<br>
Number of lines: 0<br>
Number of boundaries: 0<br>
Number of centroids: 0<br>
Number of areas: 0<br>
Number of isles: 0<br>
ERROR: /usr/lib/grass64/scripts/r.fillnulls abandoned. Removing temporary<br>
       maps, restoring user mask if needed:<br>
Removing raster &lt;MASK&gt;<br>
Removing raster &lt;r_fillnulls_18931&gt;<br>
Removing raster &lt;r_fillnulls_18931.buf&gt;<br>
Removing raster &lt;r_fillnulls_18931_filled&gt;<br>
WARNING: Raster map &lt;r_fillnulls_18931_filled&gt; not found<br>
WARNING: &lt;r_fillnulls_18931_filled&gt; nothing removed<br>
Removing vector &lt;vecttmp_fillnulls_18931&gt;<br>
WARNING: Table &lt;vecttmp_fillnulls_18931&gt; linked to vector map<br>
         &lt;vecttmp_fillnulls_18931&gt; does not exist<br>
WARNING: raster &lt;usermask_mask.18931&gt; not found<br>
<br>
<br>
On Thu, Dec 1, 2011 at 8:36 AM, Hamish &lt;<a href="mailto:hamish_b@yahoo.com">hamish_b@yahoo.com</a>&gt; wrote:<br>
<br>
&gt; Nick wrote:<br>
&gt; &gt; I am having trouble filling the null areas in the SRTM (3 second<br>
&gt; &gt; resolution) DEM for Southeast Asia. I think the reason is because the<br>
&gt; &gt; region I am trying fill is too large. The region is almost a billion<br>
&gt; &gt; cells - see g.region -p output below - but about 40% of that region is<br>
&gt; &gt; ocean areas with no DEM data. I&#39;m wondering if maybe the problem is that<br>
&gt; &gt; r.fillnulls is trying to fill the ocean areas.<br>
&gt;<br>
&gt; it will try that. a good first step is to fill in the ocean with 0s.<br>
&gt; I was just doing this yesterday with srtm data actually.<br>
&gt; GRASS&gt; r.mapcalc &quot;zero = 0&quot;<br>
&gt;<br>
&gt; then r.patch with your srtm data listed first and the zeros listed last.<br>
&gt;<br>
&gt; but be careful you don&#39;t fill in zeros where there are holes in the data<br>
&gt; on land. if you have a vector coastline use &quot;v.to.rast use=val val=1&quot; to<br>
&gt; create a land mask, then invert with:<br>
&gt;  r.mapcalc &quot;sea.mask = if(isnull(land.mask), 1, null())&quot;<br>
&gt;<br>
&gt; and use the sea.mask as the background fill-in for the r.patch step.<br>
&gt;<br>
&gt;<br>
&gt; &gt; r.fillnulls gets to the point where it says &quot;Building areas...&quot; then<br>
&gt; &gt; it says &quot;Killed&quot; and prints an error message.<br>
&gt;<br>
&gt; often &quot;Killed&quot; happens when the computer ran out of memory.<br>
&gt; not interpolating over the ocean may make the thing go much faster and<br>
&gt; need much less memory, as it has much less to do.<br>
&gt;<br>
&gt;<br>
&gt; &gt; I am using GRASS 6.4.1. Eventually I plan on using the null-filled<br>
&gt; &gt; DEM to delineate the watersheds in Southeast Asia.<br>
&gt;<br>
&gt; start thinking about your watershed threshold size now :)<br>
&gt;<br>
&gt;<br>
&gt; good luck,<br>
&gt; Hamish<br>
&gt;<br>
&gt;<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.osgeo.org/pipermail/grass-user/attachments/20111202/2a3d50ef/attachment-0001.html" target="_blank">http://lists.osgeo.org/pipermail/grass-user/attachments/20111202/2a3d50ef/attachment-0001.html</a><br>

<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 1 Dec 2011 18:33:01 +0100<br>
From: &quot;G. Allegri&quot; &lt;<a href="mailto:giohappy@gmail.com">giohappy@gmail.com</a>&gt;<br>
Subject: [GRASS-user] topology model resume (and some proposals)<br>
To: <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
Message-ID:<br>
        &lt;CAB4g1=<a href="mailto:xqBcQOjoZ49n0adS0HGsEokccwtpS4nNtotzfMgKLvSQ@mail.gmail.com">xqBcQOjoZ49n0adS0HGsEokccwtpS4nNtotzfMgKLvSQ@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
I resume (first as a repeat to myself) what I&#39;ve learned from the various<br>
email on the topic<br>
<br>
Vectors can be:<br>
<br>
LEVEL 1:<br>
 - no topology -&gt; very limited use<br>
LEVEL 2:<br>
 - unclean topology -&gt; limited use<br>
 - clean topology -&gt; full support<br>
<br>
I previously thought that LEVEL 2 was only possible for clean topologies,<br>
and I was wrong...<br>
<br>
At the moment there isn&#39;t a tool to list the the uncorrect geometries from<br>
a topological point of view. v.build only checks some constraints, not all.<br>
The proposal is to extend it to check against all the rules that are<br>
required to consider a geometry topologically correct (an extended flag to<br>
v defaul.build maybe).<br>
<br>
v.in.ogr builds and cleans (by default). It would be useful to have the<br>
&quot;clean&quot; phase available to be launched independently. I mean, something<br>
like an &quot;automatic&quot; flag for v.clean, that would operate the same cleaning<br>
as during the import of a vector.<br>
<br>
Conclusions: the topological correctness isn&#39;t a constraint for the vector<br>
topology data structure. GRASS haven&#39;t all the topology rules hard-coded<br>
(... or yes?). Most of thems (all?) are defined inside the code of v.build<br>
and v.clean, but I suppose that there isn&#39;t an autonomous<br>
library/functionality that provide the semantics of a &quot;correct topology&quot;.<br>
Am I wrong?<br>
<br>
Thanks everyone for the support ;)<br>
giovanni<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.osgeo.org/pipermail/grass-user/attachments/20111201/48197e88/attachment-0001.html" target="_blank">http://lists.osgeo.org/pipermail/grass-user/attachments/20111201/48197e88/attachment-0001.html</a><br>

<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Thu, 1 Dec 2011 13:01:38 -0800 (PST)<br>
From: Hamish &lt;<a href="mailto:hamish_b@yahoo.com">hamish_b@yahoo.com</a>&gt;<br>
Subject: [GRASS-user] Re: [GRASS-dev] Should v.in.ogr clean topology<br>
        by      default ?<br>
To: <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
Message-ID:<br>
        &lt;<a href="mailto:1322773298.49418.YahooMailClassic@web110005.mail.gq1.yahoo.com">1322773298.49418.YahooMailClassic@web110005.mail.gq1.yahoo.com</a>&gt;<br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
[cc&#39;d from grass-dev ML]<br>
<br>
Hi,<br>
<br>
a couple of points--<br>
<br>
* Radim said many times: v.in.ogr&#39;s cleaning and v.clean are not<br>
the same thing. (with a number of !! added) He explained it and<br>
understood it always better than I ever could, so check in the<br>
mailing list archives for details.<br>
<br>
* GRASS is a topological GIS. so when data is imported into GRASS<br>
it is natural and desirable that it gets converted into the<br>
family way at that time.<br>
<br>
* In defense of the option to allow non topological imports:<br>
in the past I have imported a shapefile created by leading<br>
proprietary non-topological GIS. this file was a string of<br>
buffers around points with unique ID numbers. the idea was to<br>
run (the predecessor to) v.rast.stats on each buffer to collect<br>
some neighborhood context stats for each ID point, which could<br>
be loaded into a table.  wherever the line of points was not<br>
exactly straight the buffers overlapped a little and grass&#39;s<br>
cleaning would treat it as a ven diagram and create a new<br>
centroid in the overlapping sliver. no good for extracting the<br>
buffer area where=&#39;NODE_ID = 1234&#39;.<br>
also you might consider a vector area map with multiple over-<br>
lapping home ranges for different territorial animals. not 3d,<br>
but still merging/flattening overlapping areas is not appropriate.<br>
<br>
<br>
for things like neighboring land parcels, political lines, or<br>
land/sea boundaries non-topological is a nightmare, but for<br>
other tasks it can occasionally be very useful.<br>
<br>
<br>
Hamish<br>
<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Thu, 1 Dec 2011 13:16:45 -0800 (PST)<br>
From: Hamish &lt;<a href="mailto:hamish_b@yahoo.com">hamish_b@yahoo.com</a>&gt;<br>
Subject: Re: [GRASS-user] r.fillnulls for large area<br>
To: Nick Jachowski &lt;<a href="mailto:njachowski@gmail.com">njachowski@gmail.com</a>&gt;<br>
Cc: <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
Message-ID:<br>
        &lt;<a href="mailto:1322774205.78253.YahooMailClassic@web110013.mail.gq1.yahoo.com">1322774205.78253.YahooMailClassic@web110013.mail.gq1.yahoo.com</a>&gt;<br>
Content-Type: text/plain; charset=iso-8859-1<br>
<br>
Nick wrote:<br>
&gt; Thanks for the advice to fill the ocean with<br>
&gt; zeros. It worked better, and didn&#39;t get &quot;killed&quot;,<br>
&gt; but it still didn&#39;t work...This time it made it<br>
&gt; further than before, but it got &quot;abondoned&quot; - see<br>
&gt; the output below...<br>
<br>
try editing the r.fillnulls script, on line 165<br>
replace &quot;r.to.vect input=...&quot; with<br>
&quot;r.to.vect -b input=...&quot;. I think it would work,<br>
but I&#39;m not sure if it would make it slower to run<br>
v.surf.rst or not. (?)<br>
<br>
&gt; Maybe I need to split my region into subregions<br>
&gt; and run r.fillnulls on each subregion then patch<br>
&gt; them together.<br>
<br>
yes, that should work well.<br>
<br>
&gt; Number of nodes: 13428068<br>
<br>
building topology for anything more that 3-5 million<br>
cells will consume a large amount of memory due to<br>
the cumulative effect of the small, but real,<br>
memory requirement of each individual feature.<br>
maybe if you had 16gb RAM 13 million would be ok?<br>
<br>
<br>
Hamish<br>
<br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Thu, 1 Dec 2011 20:04:38 -0200<br>
From: Marcello Gorini &lt;<a href="mailto:gorini@gmail.com">gorini@gmail.com</a>&gt;<br>
Subject: Re: [GRASS-user] r.fillnulls for large area<br>
To: Hamish &lt;<a href="mailto:hamish_b@yahoo.com">hamish_b@yahoo.com</a>&gt;<br>
Cc: <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
Message-ID:<br>
        &lt;CAEvwxEJtmTd_dEfowfDcpfk7trjAWC=<a href="mailto:OzC7xjMZKQyPO4zp3Fg@mail.gmail.com">OzC7xjMZKQyPO4zp3Fg@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
Nick wrote:<br>
<br>
<br>
<br>
&gt; &gt; Maybe I need to split my region into subregions<br>
&gt; &gt; and run r.fillnulls on each subregion then patch<br>
&gt; &gt; them together.<br>
&gt;<br>
<br>
Hamish:<br>
<br>
&gt; yes, that should work well.<br>
<br>
<br>
I always wanted to create a script to do that. Since (I think) r.fill.nulls<br>
identifies the null locations and creates small buffers around them, I<br>
believe that if we combined something like the region handling of, say, the<br>
r.roughness script, with r.fill.nulls, that would really speed up matters.<br>
<br>
Don&#39;t you think?<br>
<br>
Cheers,<br>
Marcello.<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.osgeo.org/pipermail/grass-user/attachments/20111201/02e8ea3f/attachment.html" target="_blank">http://lists.osgeo.org/pipermail/grass-user/attachments/20111201/02e8ea3f/attachment.html</a><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
<br>
<br>
End of grass-user Digest, Vol 68, Issue 2<br>
*****************************************<br>
</blockquote></div><br>