<div dir="ltr"><br><br><div class="gmail_quote">On Tue, Sep 2, 2008 at 6:42 PM, Hamish <span dir="ltr"><<a href="mailto:hamish_b@yahoo.com">hamish_b@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Jamie Adams <<a href="mailto:jaadfoo@gmail.com">jaadfoo@gmail.com</a>><br>
<div class="Ih2E3d">> I've got over 14k rasters in several mapsets that I need to store<br>
> modified date in a db for tracking purposes. I've got the<br>
> storage and retrieval worked out, but I don't see an clean (easy)<br>
> way to get the modified date via a python script.<br>
</div>....<br>
<div class="Ih2E3d">> Is there a more efficient way of getting the modified date<br>
> of a raster layer? If not, getting the full path instead?<br>
<br>
<br>
</div>MAP=roads<br>
eval `g.findfile element=hist file="$MAP"`<br>
head -n 1 "$file"<br>
<br>
It's stored as a text string; what you see is what you get.<br>
<br>
see also r.timestamp, but that is for map metadata not file creation<br>
timestamp.<br>
<div class="Ih2E3d"><br>
<br>
> os.stat (python) - has a nice date integer format, but it<br>
> requires that I have the full path to the cellhd folder.<br>
<br>
</div>use g.findfile for that.</blockquote><div><br>Ah okay, I never really understood that command. "g.findfile element=cell file=<filename> | grep ^file" returns what I need.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<div class="Ih2E3d"><br>
<br>
> Database and location are easy via g.gisenv, but getting the mapset<br>
> on an individual layer basis isn't completely straightforward.<br>
<br>
> I can use use "g.mlist -m rast pattern=<filename>", but that<br>
> essentially greps it out of a full list.<br>
<br>
</div>I don't fully understand what you mean by those two.</blockquote><div> </div><div>Yeah, it's a bit tough to explain with my processing setup. It's a non-issue now, g.findfile solved it. Thanks!<br><br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<font color="#888888"><br>
<br>
Hamish<br>
<br>
<br>
<br>
<br>
<br>
</font></blockquote></div><br></div>