<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Update mosaic dataset Footprint attribute table in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/update-mosaic-dataset-footprint-attribute-table/m-p/2727#M234</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have some time-series data stored in a file geodatabase, which contains 55 hours of data. We'd like to create a mosaic dataset&amp;nbsp;containing rasters generated at each timestamp (each hour). Using ArcPy, I generated the 55 raster datasets, each is named sequently, for example: 0,1,2,...,54. The I created a mosaic dataset and added all the 55 raster datasets in it, followed this &lt;A href="https://desktop.arcgis.com/en/arcmap/10.7/manage-data/raster-and-images/wkflw-creating-a-md-from-multiple-dates.htm"&gt;link&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Next, I need to add a timestamp field to the mosaic Footprint attribute table, and update the timestamp field based on a date value plus the number of hours indicated by the raster name. For example, for raster file 2, it will be&lt;/P&gt;&lt;PRE style="color: #000000; background-color: #ffffff; font-size: 9.8pt;"&gt;&lt;PRE style="font-size: 9.8pt;"&gt;hours_toAdd = datetime.timedelta(&lt;SPAN style="color: #660099;"&gt;hours&lt;/SPAN&gt;=&lt;SPAN style="color: #0000ff;"&gt;2&lt;/SPAN&gt;)&lt;/PRE&gt;timestamp=datetime.datetime(&lt;SPAN style="color: #0000ff;"&gt;2020&lt;/SPAN&gt;,&lt;SPAN style="color: #0000ff;"&gt;5&lt;/SPAN&gt;,&lt;SPAN style="color: #0000ff;"&gt;11&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;18&lt;/SPAN&gt;,&lt;SPAN style="color: #0000ff;"&gt;0&lt;/SPAN&gt;,&lt;SPAN style="color: #660099;"&gt;tzinfo&lt;/SPAN&gt;=tzutc())+hours_toAdd&lt;BR /&gt;&lt;BR /&gt;How to implement this using ArcPy?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Rose&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 May 2020 20:05:14 GMT</pubDate>
    <dc:creator>RoseZhou2</dc:creator>
    <dc:date>2020-05-19T20:05:14Z</dc:date>
    <item>
      <title>Update mosaic dataset Footprint attribute table</title>
      <link>https://community.esri.com/t5/python-questions/update-mosaic-dataset-footprint-attribute-table/m-p/2727#M234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have some time-series data stored in a file geodatabase, which contains 55 hours of data. We'd like to create a mosaic dataset&amp;nbsp;containing rasters generated at each timestamp (each hour). Using ArcPy, I generated the 55 raster datasets, each is named sequently, for example: 0,1,2,...,54. The I created a mosaic dataset and added all the 55 raster datasets in it, followed this &lt;A href="https://desktop.arcgis.com/en/arcmap/10.7/manage-data/raster-and-images/wkflw-creating-a-md-from-multiple-dates.htm"&gt;link&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Next, I need to add a timestamp field to the mosaic Footprint attribute table, and update the timestamp field based on a date value plus the number of hours indicated by the raster name. For example, for raster file 2, it will be&lt;/P&gt;&lt;PRE style="color: #000000; background-color: #ffffff; font-size: 9.8pt;"&gt;&lt;PRE style="font-size: 9.8pt;"&gt;hours_toAdd = datetime.timedelta(&lt;SPAN style="color: #660099;"&gt;hours&lt;/SPAN&gt;=&lt;SPAN style="color: #0000ff;"&gt;2&lt;/SPAN&gt;)&lt;/PRE&gt;timestamp=datetime.datetime(&lt;SPAN style="color: #0000ff;"&gt;2020&lt;/SPAN&gt;,&lt;SPAN style="color: #0000ff;"&gt;5&lt;/SPAN&gt;,&lt;SPAN style="color: #0000ff;"&gt;11&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;18&lt;/SPAN&gt;,&lt;SPAN style="color: #0000ff;"&gt;0&lt;/SPAN&gt;,&lt;SPAN style="color: #660099;"&gt;tzinfo&lt;/SPAN&gt;=tzutc())+hours_toAdd&lt;BR /&gt;&lt;BR /&gt;How to implement this using ArcPy?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Rose&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2020 20:05:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/update-mosaic-dataset-footprint-attribute-table/m-p/2727#M234</guid>
      <dc:creator>RoseZhou2</dc:creator>
      <dc:date>2020-05-19T20:05:14Z</dc:date>
    </item>
  </channel>
</rss>

