<?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 Re: Join multiple tables derived from multiple raster datasets in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/join-multiple-tables-derived-from-multiple-raster/m-p/1281658#M68274</link>
    <description>&lt;P&gt;Dear Johannes Linder, thank you so much for getting back.&lt;/P&gt;&lt;P&gt;I have tested this multiple ways, but seems like the table is generated, but empty.&lt;/P&gt;&lt;P&gt;I get the following system error, also the table is created with the name area_sum_of_day, yet looks empty&amp;nbsp; (like the second screenshot).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GirijaKalyani_0-1682206150301.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/68836iDD72D7C2AC5E785A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GirijaKalyani_0-1682206150301.png" alt="GirijaKalyani_0-1682206150301.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GirijaKalyani_1-1682206589602.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/68837i7928ECF8828AF94F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GirijaKalyani_1-1682206589602.png" alt="GirijaKalyani_1-1682206589602.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My file names are in style:&amp;nbsp;asi-s3125-20030928-v5.4.tif or&amp;nbsp;asi-AMSR2-s3125-20130101-v5.4.tif.&lt;/P&gt;&lt;P&gt;I want to split it around 10th character "asi-s3125-" in the first case and use 7 characters from there for the filename. Can you please provide me what is going wrong, it would save lots of time as there's heaps of data, and I have been spending a lot of time understanding these already.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be highly appreciated and greatly obliged&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 22 Apr 2023 23:41:28 GMT</pubDate>
    <dc:creator>GirijaKalyani</dc:creator>
    <dc:date>2023-04-22T23:41:28Z</dc:date>
    <item>
      <title>Join multiple tables derived from multiple raster datasets</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/join-multiple-tables-derived-from-multiple-raster/m-p/1277138#M67809</link>
      <description>&lt;P&gt;Hi all, I have multiple raster files (Daily data). All of them have a field "Area".&lt;/P&gt;&lt;P&gt;Now, I want to retrieve the sum of area of each daya (which I obviously can do using statistics).&lt;/P&gt;&lt;P&gt;But, I'm having to manually enter each day's data which is quite tedious for 20 years.&lt;/P&gt;&lt;P&gt;I want to save sum of area filed per day - for the entire year. The file names have got the information about day/month/year.&amp;nbsp; Is there an easy way out I can add a filed that has name of the file, then join all these tables into one and export it and use for further analysis?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 00:20:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/join-multiple-tables-derived-from-multiple-raster/m-p/1277138#M67809</guid>
      <dc:creator>GirijaKalyani</dc:creator>
      <dc:date>2023-04-11T00:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Join multiple tables derived from multiple raster datasets</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/join-multiple-tables-derived-from-multiple-raster/m-p/1277373#M67837</link>
      <description>&lt;P&gt;You can use a little Python.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;raster_folder = "C:/data/rasters"
output_folder = ""
output_name = "AreaSumByDay"

# create the output table
table = arcpy.management.CreateTable(output_folder, output_name)
arcpy.management.AddField(table, "Day", "TEXT")
arcpy.management.AddField(table, "SumArea", "FLOAT")

# start inserting values
with arcpy.da.InsertCursor(table, ["Day", "SumArea"]) as cursor:
    # loop over the rasters in the folder
    arcpy.env.workspace = raster_folder
    for raster in arcpy.ListRasters():
        # get the day from the raster name
        # for example, if your file names look like this: "bla_bla_date.tif"
        # you could do it like this:
        name = raster.split(".")[0]
        day = name.split("_")[-1]
        # get the sum of the area field
        raster_obj = arcpy.Raster(raster_folder + "/" + raster)
        sum_area = arcpy.RasterToNumPyArray(raster_obj).sum()
        # write into the table
        cursor.insertRow([day, sum_area])&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 11 Apr 2023 15:53:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/join-multiple-tables-derived-from-multiple-raster/m-p/1277373#M67837</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-04-11T15:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: Join multiple tables derived from multiple raster datasets</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/join-multiple-tables-derived-from-multiple-raster/m-p/1281658#M68274</link>
      <description>&lt;P&gt;Dear Johannes Linder, thank you so much for getting back.&lt;/P&gt;&lt;P&gt;I have tested this multiple ways, but seems like the table is generated, but empty.&lt;/P&gt;&lt;P&gt;I get the following system error, also the table is created with the name area_sum_of_day, yet looks empty&amp;nbsp; (like the second screenshot).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GirijaKalyani_0-1682206150301.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/68836iDD72D7C2AC5E785A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GirijaKalyani_0-1682206150301.png" alt="GirijaKalyani_0-1682206150301.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GirijaKalyani_1-1682206589602.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/68837i7928ECF8828AF94F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GirijaKalyani_1-1682206589602.png" alt="GirijaKalyani_1-1682206589602.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My file names are in style:&amp;nbsp;asi-s3125-20030928-v5.4.tif or&amp;nbsp;asi-AMSR2-s3125-20130101-v5.4.tif.&lt;/P&gt;&lt;P&gt;I want to split it around 10th character "asi-s3125-" in the first case and use 7 characters from there for the filename. Can you please provide me what is going wrong, it would save lots of time as there's heaps of data, and I have been spending a lot of time understanding these already.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be highly appreciated and greatly obliged&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Apr 2023 23:41:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/join-multiple-tables-derived-from-multiple-raster/m-p/1281658#M68274</guid>
      <dc:creator>GirijaKalyani</dc:creator>
      <dc:date>2023-04-22T23:41:28Z</dc:date>
    </item>
  </channel>
</rss>

