<div dir="ltr"><div><div><div><div>Hi <br></div>I am trying to use the module "t.rast.gapfill" to fill the gaps in my temporal datasets. I have couple of doubts on getting my tasks done.<br><br></div><div>I am using GRASS 71 svn, latest.<br></div><div><br></div><div>##Q1:<br></div><div><br></div>In my temporal data , there are multiple continuous gaps. In this case, I am not getting the interpolated results. Please check the below work flow:<br><br><i>r.mapcalc expr="map1 = 1" --o<br>r.mapcalc expr="map2 = 3" --o<br>r.mapcalc expr="map3 = 5" --o<br>r.mapcalc expr="map4 = 7" --o<br>r.mapcalc expr="map5 = 9" --o<br>t.register type=raster maps=map1 start=2012-08-20 end=2012-08-21 --o<br>t.register type=raster maps=map2 start=2012-08-22 end=2012-08-23 --o<br>t.register type=raster maps=map3 start=2012-08-25 end=2012-08-26 --o<br>t.register type=raster maps=map4 start=2012-08-29 end=2012-08-30 --o<br>t.register type=raster maps=map5 start=2012-09-03 end=2012-09-04 --o<br>t.create type=strds temporaltype=absolute output=mapT1 title="test for all the gaps filled together" description="test for all the gaps filled together"<br>t.register type=raster input=mapT1 maps=map1,map2,map3,map4,map5 --o<br>t.rast.list input=mapT1 columns=name,start_time,min,max<br>t.rast.list input=mapT1 method=gran</i><br><div style="margin-left:40px"><span style="color:rgb(255,0,0)"><i>id|name|mapset|start_time|end_time|interval_length|distance_from_begin</i></span><br><span style="color:rgb(255,0,0)"><i><span style="color:rgb(0,0,255)">map1@testtgrass|map1|testtgrass|2012-08-20 00:00:00|2012-08-21 00:00:00|1.0|0.0</span></i></span><br><span style="color:rgb(255,0,0)"><i>None|None|None|2012-08-21 00:00:00|2012-08-22 00:00:00|1.0|1.0</i></span><br><span style="color:rgb(255,0,0)"><i><span style="color:rgb(0,0,255)">map2@testtgrass|map2|testtgrass|2012-08-22 00:00:00|2012-08-23 00:00:00|1.0|2.0</span></i></span><br><span style="color:rgb(255,0,0)"><i>None|None|None|2012-08-23 00:00:00|2012-08-24 00:00:00|1.0|3.0</i></span><br><span style="color:rgb(255,0,0)"><i>None|None|None|2012-08-24 00:00:00|2012-08-25 00:00:00|1.0|4.0</i></span><br><span style="color:rgb(255,0,0)"><i><span style="color:rgb(0,0,255)">map3@testtgrass|map3|testtgrass|2012-08-25 00:00:00|2012-08-26 00:00:00|1.0|5.0</span></i></span><br><span style="color:rgb(255,0,0)"><i>None|None|None|2012-08-26 00:00:00|2012-08-27 00:00:00|1.0|6.0</i></span><br><span style="color:rgb(255,0,0)"><i>None|None|None|2012-08-27 00:00:00|2012-08-28 00:00:00|1.0|7.0</i></span><br><span style="color:rgb(255,0,0)"><i>None|None|None|2012-08-28 00:00:00|2012-08-29 00:00:00|1.0|8.0</i></span><br><span style="color:rgb(255,0,0)"><i><span style="color:rgb(0,0,255)">map4@testtgrass|map4|testtgrass|2012-08-29 00:00:00|2012-08-30 00:00:00|1.0|9.0</span></i></span><br><span style="color:rgb(255,0,0)"><i>None|None|None|2012-08-30 00:00:00|2012-08-31 00:00:00|1.0|10.0</i></span><br><span style="color:rgb(255,0,0)"><i>None|None|None|2012-08-31 00:00:00|2012-09-01 00:00:00|1.0|11.0</i></span><br><span style="color:rgb(255,0,0)"><i>None|None|None|2012-09-01 00:00:00|2012-09-02 00:00:00|1.0|12.0</i></span><br><span style="color:rgb(255,0,0)"><i>None|None|None|2012-09-02 00:00:00|2012-09-03 00:00:00|1.0|13.0</i></span><br><span style="color:rgb(255,0,0)"><i><span style="color:rgb(0,0,255)">map5@testtgrass|map5|testtgrass|2012-09-03 00:00:00|2012-09-04 00:00:00|1.0|14.0</span></i></span><br></div><br></div># Doing the gapfill:<br></div><div><i>t.rast.gapfill input=mapT1 base=gap<br>t.rast.list input=mapT1 method=gran</i><br><div style="margin-left:40px"><span style="color:rgb(255,0,0)"><i>id|name|mapset|start_time|end_time|interval_length|distance_from_begin</i></span><br><span style="color:rgb(255,0,0)"><i><span style="color:rgb(0,0,255)">map1@testtgrass|map1|testtgrass|2012-08-20 00:00:00|2012-08-21 00:00:00|1.0|0.0</span></i></span><br><span style="color:rgb(255,0,0)"><i>gap_10@testtgrass|gap_10|testtgrass|2012-08-21 00:00:00|2012-08-22 00:00:00|1.0|1.0</i></span><br><span style="color:rgb(255,0,0)"><i><span style="color:rgb(0,0,255)">map2@testtgrass|map2|testtgrass|2012-08-22 00:00:00|2012-08-23 00:00:00|1.0|2.0</span></i></span><br><span style="color:rgb(255,0,0)"><i>gap_11@testtgrass|gap_11|testtgrass|2012-08-23 00:00:00|2012-08-24 00:00:00|1.0|3.0</i></span><br><span style="color:rgb(255,0,0)"><i>gap_11@testtgrass|gap_11|testtgrass|2012-08-24 00:00:00|2012-08-25 00:00:00|1.0|4.0</i></span><br><span style="color:rgb(255,0,0)"><i><span style="color:rgb(0,0,255)">map3@testtgrass|map3|testtgrass|2012-08-25 00:00:00|2012-08-26 00:00:00|1.0|5.0</span></i></span><br><span style="color:rgb(255,0,0)"><i>gap_12@testtgrass|gap_12|testtgrass|2012-08-26 00:00:00|2012-08-27 00:00:00|1.0|6.0</i></span><br><span style="color:rgb(255,0,0)"><i>gap_12@testtgrass|gap_12|testtgrass|2012-08-27 00:00:00|2012-08-28 00:00:00|1.0|7.0</i></span><br><span style="color:rgb(255,0,0)"><i>gap_12@testtgrass|gap_12|testtgrass|2012-08-28 00:00:00|2012-08-29 00:00:00|1.0|8.0</i></span><br><span style="color:rgb(255,0,0)"><i><span style="color:rgb(0,0,255)">map4@testtgrass|map4|testtgrass|2012-08-29 00:00:00|2012-08-30 00:00:00|1.0|9.0</span></i></span><br><span style="color:rgb(255,0,0)"><i>gap_13@testtgrass|gap_13|testtgrass|2012-08-30 00:00:00|2012-08-31 00:00:00|1.0|10.0</i></span><br><span style="color:rgb(255,0,0)"><i>gap_13@testtgrass|gap_13|testtgrass|2012-08-31 00:00:00|2012-09-01 00:00:00|1.0|11.0</i></span><br><span style="color:rgb(255,0,0)"><i>gap_13@testtgrass|gap_13|testtgrass|2012-09-01 00:00:00|2012-09-02 00:00:00|1.0|12.0</i></span><br><span style="color:rgb(255,0,0)"><i>gap_13@testtgrass|gap_13|testtgrass|2012-09-02 00:00:00|2012-09-03 00:00:00|1.0|13.0</i></span><br><span style="color:rgb(255,0,0)"><i><span style="color:rgb(0,0,255)">map5@testtgrass|map5|testtgrass|2012-09-03 00:00:00|2012-09-04 00:00:00|1.0|14.0</span></i></span><br></div><br></div><div>For example; between <span style="color:rgb(255,0,0)"><i>2012-08-29 and </i></span><span style="color:rgb(255,0,0)"><i>2012-09-03 </i><span style="color:rgb(68,68,68)">there are 4 days of gap, but the gap filling is providing the same image at all the 4 gaps. It seems to be generating only one image between two valid temporal images, no matter how long the gap is!!<br><br></span></span></div><div><span style="color:rgb(255,0,0)"><span style="color:rgb(68,68,68)">So is the gap filling will work only for <b>one gap</b> between <b>2 valid temporal images</b>?<br></span></span></div><div><span style="color:rgb(255,0,0)"><i></i></span></div><div><br><br></div><div>###2.<br><br></div><div>When I try to do gap fill with the "where" condition, I am getting no results in some cases.<br></div><div>For example when I try:<br><br>t.rast.gapfill input=mapT1 where="start_time = '2012-08-21 00:00:00'" base=gap<br><div style="margin-left:40px"><i><span style="color:rgb(255,0,0)">No gaps found</span></i><br><br></div></div><div>OR when I try;<br><br><i>t.rast.gapfill input=mapT1 where="start_time > '2012-08-20 00:00:00'" base=gap</i><br></div><div><br>It misses the first gap and fills the other gap, see below:<br><br><i>t.rast.list input=mapT1 method=gran</i><br><div style="margin-left:40px"><i><span style="color:rgb(255,0,0)">id|name|mapset|start_time|end_time|interval_length|distance_from_begin</span></i><br><i><span style="color:rgb(255,0,0)"><span style="color:rgb(0,0,255)">map1@testtgrass|map1|testtgrass|2012-08-20 00:00:00|2012-08-21 00:00:00|1.0|0.0</span></span></i><br><i><span style="color:rgb(255,0,0)">None|None|None|2012-08-21 00:00:00|2012-08-22 00:00:00|1.0|1.0</span></i><br><i><span style="color:rgb(255,0,0)"><span style="color:rgb(0,0,255)">map2@testtgrass|map2|testtgrass|2012-08-22 00:00:00|2012-08-23 00:00:00|1.0|2.0</span></span></i><br><i><span style="color:rgb(255,0,0)">gap_8@testtgrass|gap_8|testtgrass|2012-08-23 00:00:00|2012-08-24 00:00:00|1.0|3.0</span></i><br><i><span style="color:rgb(255,0,0)">gap_8@testtgrass|gap_8|testtgrass|2012-08-24 00:00:00|2012-08-25 00:00:00|1.0|4.0</span></i><br><i><span style="color:rgb(255,0,0)"><span style="color:rgb(0,0,255)">map3@testtgrass|map3|testtgrass|2012-08-25 00:00:00|2012-08-26 00:00:00|1.0|5.0</span></span></i><br><i><span style="color:rgb(255,0,0)">gap_9@testtgrass|gap_9|testtgrass|2012-08-26 00:00:00|2012-08-27 00:00:00|1.0|6.0</span></i><br><i><span style="color:rgb(255,0,0)">gap_9@testtgrass|gap_9|testtgrass|2012-08-27 00:00:00|2012-08-28 00:00:00|1.0|7.0</span></i><br><i><span style="color:rgb(255,0,0)">gap_9@testtgrass|gap_9|testtgrass|2012-08-28 00:00:00|2012-08-29 00:00:00|1.0|8.0</span></i><br><i><span style="color:rgb(255,0,0)"><span style="color:rgb(0,0,255)">map4@testtgrass|map4|testtgrass|2012-08-29 00:00:00|2012-08-30 00:00:00|1.0|9.0</span></span></i><br><i><span style="color:rgb(255,0,0)">gap_10@testtgrass|gap_10|testtgrass|2012-08-30 00:00:00|2012-08-31 00:00:00|1.0|10.0</span></i><br><i><span style="color:rgb(255,0,0)">gap_10@testtgrass|gap_10|testtgrass|2012-08-31 00:00:00|2012-09-01 00:00:00|1.0|11.0</span></i><br><i><span style="color:rgb(255,0,0)">gap_10@testtgrass|gap_10|testtgrass|2012-09-01 00:00:00|2012-09-02 00:00:00|1.0|12.0</span></i><br><i><span style="color:rgb(255,0,0)">gap_10@testtgrass|gap_10|testtgrass|2012-09-02 00:00:00|2012-09-03 00:00:00|1.0|13.0</span></i><br><i><span style="color:rgb(255,0,0)"><span style="color:rgb(0,0,255)">map5@testtgrass|map5|testtgrass|2012-09-03 00:00:00|2012-09-04 00:00:00|1.0|14.0</span></span></i><br></div><br></div><div>Here it works if I give one day before the actual valid temporal image in the where condition. So if I give <i>"start_time > '2012-08-19 00:00:00'", </i>the first gap will also get filled<i>.</i> But It would be great if we can query on the missing dates/time.<br><br></div><div>All suggestions welcome.<br><br></div><div>Thanks in advance<br><br></div><div>Regards<br><br>Sajid<br></div><div><br>--<br><div><div><div><div><div class="gmail_signature"><div dir="ltr"><div><br><a href="http://gis.cri.fmach.it/pareeth/" target="_blank">http://gis.cri.fmach.it/pareeth/</a><br><br>Fondazione Edmund Mach<br>Research and Innovation Centre<br>
GIS and Remote Sensing Unit/Limnology and River ecology<br>Via Mach 1, 38010 San Michele all'Adige (TN) - Italy<br>Phone +39 461 615 669<br><a href="mailto:spareeth@gmail.com" target="_blank">spareeth@gmail.com</a><br>
<a href="mailto:sajid.pareeth@fmach.it" target="_blank">sajid.pareeth@fmach.it</a><br>skype: spareeth</div></div></div>
</div></div></div></div></div></div>