<?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: How to Get  Polygon of Raster Extent in ArcGIS Pro in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1096564#M45341</link>
    <description>&lt;LI-CODE lang="python"&gt;xmin = extent.XMin
xmax = extent.XMax
ymin = extent.YMin
ymax = extent.YMax
lowerLeft = arcpy.Point(xmin, ymin)
lowerRight = arcpy.Point(xmax, ymin)
# etcetera&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 08 Sep 2021 22:10:35 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2021-09-08T22:10:35Z</dc:date>
    <item>
      <title>How to Get  Polygon of Raster Extent in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1096177#M45306</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to know a way, or several methods if they exist, of generating a rectangular polygon representing the footprint of a raster using ArcGIS Pro.&amp;nbsp; I don't want to go through the extra time to convert a raster to polygon as is, because this is a potentially very time-consuming step (especially if the raster is an image), whereas I only want a single-valued output.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this method does not require higher licensing levels or extensions, that would be even better, but if not that's ok too.&lt;/P&gt;&lt;P&gt;If there's a custom Python script that will do that job, or a snippet of Python I could insert into a script, please let me know.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 20:33:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1096177#M45306</guid>
      <dc:creator>dgray</dc:creator>
      <dc:date>2021-09-09T20:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to Get  Polygon of Raster Extent in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1096202#M45310</link>
      <description>&lt;P&gt;If you can get the extent of the raster, you can create a polygon then add that to a new featureclass&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/classes/extent.htm" target="_blank"&gt;Extent—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you prefer a simple raster representing the extent, then&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/spatial-analyst/create-constant-raster.htm" target="_blank"&gt;Create Constant Raster (Spatial Analyst)—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;using a value of 1 and the cell size and extent of your current raster.&amp;nbsp; A constant raster... even if temporary... will convert to a polygon featureclass quite quickly since it only has one value&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 01:47:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1096202#M45310</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-09-08T01:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to Get  Polygon of Raster Extent in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1096244#M45314</link>
      <description>&lt;P&gt;I think Raster Domain 3D tool can do it. It outputs a polygon/line geometry of the input raster.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 05:20:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1096244#M45314</guid>
      <dc:creator>Elijah</dc:creator>
      <dc:date>2021-09-08T05:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to Get  Polygon of Raster Extent in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1096509#M45331</link>
      <description>&lt;P&gt;Mosaic datset also generqte the raster foot print based on raster extent wothout any add on extension licenses.&lt;/P&gt;&lt;P&gt;Here is the link of arcmap, but similar you can try for pro. I have done in pro 2.0 and later versions&lt;/P&gt;&lt;P&gt;&lt;A href="https://desktop.arcgis.com/en/arcmap/10.3/manage-data/raster-and-images/mosaic-dataset-footprints.htm" target="_blank" rel="noopener"&gt;https://desktop.arcgis.com/en/arcmap/10.3/manage-data/raster-and-images/mosaic-dataset-footprints.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 18:42:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1096509#M45331</guid>
      <dc:creator>DrVSSKiran</dc:creator>
      <dc:date>2021-09-08T18:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to Get  Polygon of Raster Extent in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1096548#M45340</link>
      <description>&lt;P&gt;Thanks for your suggestions so far.&amp;nbsp; I will test the mosaic method, as I'm looking specifically for a way to not worry about licensing levels and extensions.&lt;/P&gt;&lt;P&gt;So far, I've created a working Python script (derived from another script meant to composite satellite imagery), which generates extent shapefiles of a satellite imagery raster based on min and max coordinates.&amp;nbsp; The biggest problem is that it assumes all rasters are oriented perfectly upright.&amp;nbsp; So it did what I asked it to do, but it's not actually the real extent, as my source rasters are angled.&lt;/P&gt;&lt;P&gt;Is there a way to get the corner coordinates of my raster's extent, not the mins and maxes?&amp;nbsp; Please take a look at my script (remove the .txt from the file) and provide your thoughts.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 21:35:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1096548#M45340</guid>
      <dc:creator>dgray</dc:creator>
      <dc:date>2021-09-08T21:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to Get  Polygon of Raster Extent in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1096564#M45341</link>
      <description>&lt;LI-CODE lang="python"&gt;xmin = extent.XMin
xmax = extent.XMax
ymin = extent.YMin
ymax = extent.YMax
lowerLeft = arcpy.Point(xmin, ymin)
lowerRight = arcpy.Point(xmax, ymin)
# etcetera&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 08 Sep 2021 22:10:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1096564#M45341</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-09-08T22:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to Get  Polygon of Raster Extent in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1096572#M45343</link>
      <description>&lt;P&gt;Yeah, but if you have an angled raster (e.g. diamond shape), the lower left corner will not have a coincidence of xmin and ymin, etc.&amp;nbsp; You'll have a ymin, but the x value will be somewhere between the min and max extents of x.&amp;nbsp; Same with y...the upper right corner will have the ymax value, but the x value isn't necessarily at its max.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dgray_0-1631140301692.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/22637i612E77D40E4E1FAF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dgray_0-1631140301692.png" alt="dgray_0-1631140301692.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I'm really wanting to do is create a polygon that shows the exact footprint of the raster, regardless of its orientation.&amp;nbsp; I guess I'm saying the word extents, but it's the footprint I'm after, if I'm using terminology correctly.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 22:33:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1096572#M45343</guid>
      <dc:creator>dgray</dc:creator>
      <dc:date>2021-09-08T22:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to Get  Polygon of Raster Extent in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1096581#M45344</link>
      <description>&lt;P&gt;That can't be derived from the extent obviously, you will have to convert the nodata collar to a polygon, which you could get by classifying the nodata collar to 1 and everything else to 0.&amp;nbsp; Your probably multipart polygon would then have to be queried for each part's extent&lt;/P&gt;&lt;P&gt;A simpler solution would be to return the intersection points of the nodata and data collars&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 23:00:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1096581#M45344</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-09-08T23:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to Get  Polygon of Raster Extent in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1096586#M45345</link>
      <description>&lt;P&gt;Hmm, ok, can this be done without extra licensing levels or extensions?&amp;nbsp; How do you get the data and nodata collars?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 23:09:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1096586#M45345</guid>
      <dc:creator>dgray</dc:creator>
      <dc:date>2021-09-08T23:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to Get  Polygon of Raster Extent in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1096927#M45385</link>
      <description>&lt;P&gt;So I ended up creating a script using the Mosaic dataset footprint generation.&amp;nbsp; It creates extra intermediate steps but it isn't too bad--I just set a scratch workspace and delete the content later.&lt;/P&gt;&lt;P&gt;However, I'm still interested in learning more about the data and nodata collar method.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 20:04:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1096927#M45385</guid>
      <dc:creator>dgray</dc:creator>
      <dc:date>2021-09-09T20:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to Get  Polygon of Raster Extent in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1339823#M74200</link>
      <description>&lt;P&gt;Did anything ever come from this? I am attempting to batch export the extent of multiple historic maps (all raster). I suppose I am looking for the footprint as well and not the extent itself.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 21:19:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1339823#M74200</guid>
      <dc:creator>ClaireMcHenry2</dc:creator>
      <dc:date>2023-10-19T21:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to Get  Polygon of Raster Extent in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1383648#M79011</link>
      <description>&lt;P&gt;It seems like a basic function but in my experience, it's not. There is one function that comes very close and it's a quick one-step solution. It's called "Raster Domain".. However, the Downsides: it requires 3D Analyst, and more importantly, the final polygon goes through the &lt;STRONG&gt;centroid&lt;/STRONG&gt; of each cell at the data extent of the raster, so it's not an exact 'footprint' as it falls a half cell short on all sides of features represented. But if you want something quick and approximate, this would be the ideal solution.&lt;BR /&gt;&lt;BR /&gt;For something more exact, the simplest method would be to use Raster Calculator (which requires a Spatial or Image Analyst license). Set the "NoData" Environment variable to something other than Zero. If you have a floating point or non-discrete raster like a DEM, you will first need to convert your raster to integer. Second, multiply the raster by Zero, so you get a single value for the entire raster where there were valid values. Third, convert the Zero raster to a polygon. Now you have your extents based on features in a raster.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 21:27:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1383648#M79011</guid>
      <dc:creator>JohnGaiot</dc:creator>
      <dc:date>2024-02-16T21:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to Get  Polygon of Raster Extent in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1406479#M81535</link>
      <description>&lt;P&gt;Hello, I was also trying to do this so I could label all my rasters. To do this I had to create a polygon layer. &lt;SPAN&gt;Make sure the project you are working on is saved and closed, then open the python notebook in a different project. Also, I only had one 'Map' - when I had multiple it would not work.&amp;nbsp;&lt;/SPAN&gt;Below is my python code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;# Set the workspace environment&lt;BR /&gt;arcpy.env.workspace = r"C:\path\to\your\geodatabase.gdb" # Update the path to your geodatabase&lt;/P&gt;&lt;P&gt;# Input map project file (.aprx)&lt;BR /&gt;map_project = r"C:\path\to\your\map_project.aprx" # Update the path to your map project file (.aprx)&lt;/P&gt;&lt;P&gt;# Reference the map project&lt;BR /&gt;aprx = arcpy.mp.ArcGISProject(map_project)&lt;/P&gt;&lt;P&gt;# Get all the maps in the project&lt;BR /&gt;maps = aprx.listMaps()&lt;/P&gt;&lt;P&gt;# Create a polygon feature class to store layer names as polygons&lt;BR /&gt;polygon_fc_name = "LayerNamesPolygon"&lt;BR /&gt;polygon_fc_path = arcpy.management.CreateFeatureclass(arcpy.env.workspace, polygon_fc_name, "POLYGON").getOutput(0)&lt;/P&gt;&lt;P&gt;# Add a field to store layer names in the polygon feature class&lt;BR /&gt;arcpy.management.AddField(polygon_fc_path, "Layer_Name", "TEXT")&lt;/P&gt;&lt;P&gt;# Iterate through each map in the project&lt;BR /&gt;for map_obj in maps:&lt;BR /&gt;# Iterate through each layer in the map object&lt;BR /&gt;for lyr in map_obj.listLayers():&lt;BR /&gt;if lyr.isRasterLayer:&lt;BR /&gt;# Get the raster layer name&lt;BR /&gt;raster_layer_name = lyr.name&lt;/P&gt;&lt;P&gt;# Get the extent of the raster layer&lt;BR /&gt;desc = arcpy.Describe(lyr)&lt;BR /&gt;extent = desc.extent&lt;/P&gt;&lt;P&gt;# Create a polygon from the extent&lt;BR /&gt;array = arcpy.Array([extent.lowerLeft, extent.lowerRight, extent.upperRight, extent.upperLeft])&lt;BR /&gt;polygon = arcpy.Polygon(array)&lt;/P&gt;&lt;P&gt;# Insert the polygon with layer name into the feature class&lt;BR /&gt;with arcpy.da.InsertCursor(polygon_fc_path, ["SHAPE@", "Layer_Name"]) as cursor:&lt;BR /&gt;cursor.insertRow([polygon, raster_layer_name])&lt;/P&gt;&lt;P&gt;# Save changes to the map project&lt;BR /&gt;aprx.save()&lt;/P&gt;&lt;P&gt;# Delete the ArcGISProject object to release locks&lt;BR /&gt;del aprx&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 16:34:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-get-polygon-of-raster-extent-in-arcgis-pro/m-p/1406479#M81535</guid>
      <dc:creator>Town_ofCBS_GIS</dc:creator>
      <dc:date>2024-04-05T16:34:01Z</dc:date>
    </item>
  </channel>
</rss>

