<?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: Create index/outline of rasters in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/create-index-outline-of-rasters/m-p/174207#M9864</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This would be a really useful tool. I've often felt the same need, but I&amp;nbsp; do it in other software.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 Jan 2014 14:26:04 GMT</pubDate>
    <dc:creator>FionaGregory</dc:creator>
    <dc:date>2014-01-31T14:26:04Z</dc:date>
    <item>
      <title>Create index/outline of rasters</title>
      <link>https://community.esri.com/t5/data-management-questions/create-index-outline-of-rasters/m-p/174201#M9858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to create an index of 60+ rasters -- I just want a simple polygon file that shows the outlines of the images so I can see where they are at a glance, rather than having to open each raster. These are all individual .imgs. The only out-of-the-box tools I have found are for mosaics, not for individual files (we already have a composite of the rasters, so I don't want to take the time or network space to create an unnecessary, monstrous mosaic). Is there a non-manual, non-Python way to do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any thoughts would be appreciated. Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ps - I can use 10.1 or 9.3.1&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Dec 2012 17:10:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/create-index-outline-of-rasters/m-p/174201#M9858</guid>
      <dc:creator>JanetBrewster</dc:creator>
      <dc:date>2012-12-20T17:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: Create index/outline of rasters</title>
      <link>https://community.esri.com/t5/data-management-questions/create-index-outline-of-rasters/m-p/174202#M9859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What I have on file somewhere is a short Python script that will do it, but you don't want Python?&amp;nbsp; As far as I know, the best way to do it is by script of some kind - VBA, or even a compiled tool, but why bother with the install when you already presumably have Python installed?&amp;nbsp; The script I cobbled together loops to retrieve the min and max XY extent of the rasters to then insert polygons for....and the speed of it is shocking, processing thousands of raster datasets in mere seconds.&amp;nbsp; I set it up so I'd have both a shapefile (or feature class) and, if I export to a table, a legacy image catalog (because I have it also write IMAGE, XMIN, YMIN, XMAX, YMAX in the attribute table).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you still want some other solution?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Dec 2012 18:16:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/create-index-outline-of-rasters/m-p/174202#M9859</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2012-12-20T18:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: Create index/outline of rasters</title>
      <link>https://community.esri.com/t5/data-management-questions/create-index-outline-of-rasters/m-p/174203#M9860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you tried to create a &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//009t00000037000000"&gt;Mosaic Dataset&lt;/A&gt;&lt;SPAN&gt; or an &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//009t0000002z000000"&gt;unmanaged Raster catalog&lt;/A&gt;&lt;SPAN&gt;?&amp;nbsp; One of the outputs are a polygon feature class that can be exported that has the rasters correlated.&amp;nbsp; This should be the most direct option.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Dec 2012 18:58:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/create-index-outline-of-rasters/m-p/174203#M9860</guid>
      <dc:creator>JeffreySwain</dc:creator>
      <dc:date>2012-12-20T18:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: Create index/outline of rasters</title>
      <link>https://community.esri.com/t5/data-management-questions/create-index-outline-of-rasters/m-p/174204#M9861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is the script I was referring to earlier.... wow, is it aging - I need to update it for arcpy, but I'm pretty certain it still works in 10.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Substitute your variable pathnames, etc., in the spaces denoted by '&amp;lt; insert *** param here&amp;nbsp; &amp;gt;':&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import arcgisscripting
gp = arcgisscripting.create(9.3)
gp.overwriteoutput = 'true'

# here's where you need to define some variables, only 4:
gp.workspace = r'&amp;lt; insert full root path to directory containing image tiles &amp;gt;'
coord_system = 'PROJCS[&amp;lt; insert coord sys params here &amp;gt;]'
GridName = '&amp;lt; your shapefile (you can convert to fc later, as you wish) &amp;gt;'
IMAGEfldLen = &amp;lt; your numeric length value for the image name field (suggest 50 or less) &amp;gt;

gp.CreateFeatureClass_management(gp.workspace, GridName, 'POLYGON', '', '', '', coord_system)
fields = ['IMAGE', 'XMIN', 'XMAX', 'YMIN', 'YMAX']
gp.AddField_management(GridName, fields[0], 'TEXT', '', '', IMAGEfldLen)
for i in range(1, 5):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.AddField_management(GridName, fields&lt;I&gt;, 'DOUBLE', 18, 17)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "added field: " + fields&lt;I&gt;
 
rasters = gp.ListRasters()
arrayObj = gp.CreateObject('Array')
 
outRows = gp.InsertCursor(GridName)
 
for raster in rasters:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; extent = gp.describe(raster).extent
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arrayObj.add(extent.lowerleft)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arrayObj.add(extent.lowerright)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arrayObj.add(extent.upperright)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arrayObj.add(extent.upperleft)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arrayObj.add(extent.lowerleft)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feat = outRows.NewRow()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feat.Shape = arrayObj
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; image = '.\\' + raster
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feat.SetValue('IMAGE', image)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feat.SetValue('XMIN', extent.xmin)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feat.SetValue('YMIN', extent.ymin)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feat.SetValue('XMAX', extent.xmax)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feat.SetValue('YMAX', extent.ymax)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outRows.InsertRow(feat)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arrayObj.RemoveAll()
 
del outRows
&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That should do it - if I get more time at a later date, I'll update this to use arcpy, use the da module cursor processing if possible, and add a script tool interface.&amp;nbsp; As it is, you'll have to open the file in, say, a text editor, and change your params where instructed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that works well for you!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[Note:&amp;nbsp; If I'm not mistaken, you may have to build a spatial index to view it properly (it's in the Toolbox) or if importing the resultant shp into a gdb, one will be built for you.]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Wayne&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:00:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/create-index-outline-of-rasters/m-p/174204#M9861</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2021-12-11T09:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Create index/outline of rasters</title>
      <link>https://community.esri.com/t5/data-management-questions/create-index-outline-of-rasters/m-p/174205#M9862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks , Wayne! Maybe at some point I'll try the Python, but I've forgotten everything I've learned so I'm not facile enough with it to test it out right now.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Dec 2012 20:49:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/create-index-outline-of-rasters/m-p/174205#M9862</guid>
      <dc:creator>JanetBrewster</dc:creator>
      <dc:date>2012-12-20T20:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: Create index/outline of rasters</title>
      <link>https://community.esri.com/t5/data-management-questions/create-index-outline-of-rasters/m-p/174206#M9863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Another possibility but somewhat more manual:&amp;nbsp; Run raster calculator or resample to make all the values something easy like 1.&amp;nbsp; Convert raster into polygon. It could be modeled for repeatability on each raster.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2012 23:05:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/create-index-outline-of-rasters/m-p/174206#M9863</guid>
      <dc:creator>TrishRice</dc:creator>
      <dc:date>2012-12-21T23:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: Create index/outline of rasters</title>
      <link>https://community.esri.com/t5/data-management-questions/create-index-outline-of-rasters/m-p/174207#M9864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This would be a really useful tool. I've often felt the same need, but I&amp;nbsp; do it in other software.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 14:26:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/create-index-outline-of-rasters/m-p/174207#M9864</guid>
      <dc:creator>FionaGregory</dc:creator>
      <dc:date>2014-01-31T14:26:04Z</dc:date>
    </item>
  </channel>
</rss>

