<div dir="ltr">Hello all,<br><br>I&#39;ve got over 14k rasters in several mapsets that I need to store modified date in a db for tracking purposes.&nbsp; I&#39;ve got the storage and retrieval worked out, but I don&#39;t see an clean (easy) way to get the modified date via a python script.<br>
<br>So far I&#39;ve come up with:<br>&nbsp;- parse it out of <a href="http://r.info">r.info</a><br>&nbsp;- get the modified date in the cellhd folder using os.stat<br><br>The problems with these approaches:<br><br><a href="http://r.info">r.info</a> - requires parsing, and I need to reformat the date in a way that&#39;s easily comparable.&nbsp; I&#39;d prefer not to rely on parsing anyway.&nbsp; Would be nice to have &quot;shell script&quot; output option.<br>
<br>os.stat (python) - has a nice date integer format, but it requires that I have the full path to the cellhd folder.&nbsp; Database and location are easy via g.gisenv, but getting the mapset on an individual layer basis isn&#39;t completely straightforward.&nbsp; I can use use &quot;g.mlist -m rast pattern=&lt;filename&gt;&quot;, but that essentially greps it out of a full list.&nbsp; <br>
<br>Is there a more efficient way of getting the modified date of a raster layer?&nbsp; If not, getting the full path instead?<br><br>Thanks,<br><br>Jamie Adams<br></div>