<?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 How to export Map as GeoTIFF through Python? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-export-map-as-geotiff-through-python/m-p/1200773#M58358</link>
    <description>&lt;P&gt;New to GIS/ArcGIS Pro, so apologies in advance if I say anything incorrect. I downloaded Esri's World Imagery tile layer, and upon opening it in ArcGIS Pro was able to zoom into an area and export that location as a GeoTIFF file manually by going to Share -&amp;gt; Export Map -&amp;gt; GeoTIFF.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does the ArcGIS Python API include a way to write a script to do all this through code (finding a target area of the tile layer/Map file through input coordinates or shapefile or something else and exporting it as a GeoTIFF file)? I tried exportToTIFF from &lt;A href="https://pro.arcgis.com/en/pro-app/2.7/arcpy/mapping/layout-class.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/2.7/arcpy/mapping/layout-class.htm&lt;/A&gt;&amp;nbsp;but wasn't able to get what I wanted.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Aug 2022 12:59:40 GMT</pubDate>
    <dc:creator>ssK_0</dc:creator>
    <dc:date>2022-08-09T12:59:40Z</dc:date>
    <item>
      <title>How to export Map as GeoTIFF through Python?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-export-map-as-geotiff-through-python/m-p/1200773#M58358</link>
      <description>&lt;P&gt;New to GIS/ArcGIS Pro, so apologies in advance if I say anything incorrect. I downloaded Esri's World Imagery tile layer, and upon opening it in ArcGIS Pro was able to zoom into an area and export that location as a GeoTIFF file manually by going to Share -&amp;gt; Export Map -&amp;gt; GeoTIFF.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does the ArcGIS Python API include a way to write a script to do all this through code (finding a target area of the tile layer/Map file through input coordinates or shapefile or something else and exporting it as a GeoTIFF file)? I tried exportToTIFF from &lt;A href="https://pro.arcgis.com/en/pro-app/2.7/arcpy/mapping/layout-class.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/2.7/arcpy/mapping/layout-class.htm&lt;/A&gt;&amp;nbsp;but wasn't able to get what I wanted.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 12:59:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-export-map-as-geotiff-through-python/m-p/1200773#M58358</guid>
      <dc:creator>ssK_0</dc:creator>
      <dc:date>2022-08-09T12:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to export Map as GeoTIFF through Python?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-export-map-as-geotiff-through-python/m-p/1200906#M58385</link>
      <description>&lt;P&gt;The Python Map Automation API (aka arcpy.mp) should allow you to do exactly what you want.&amp;nbsp; You will want to work with the MapView class instead of Layout, most likely.&amp;nbsp; First, review those examples to change extent (i.e., camera) and then use the MapView.exportToTiff() function.&amp;nbsp; There are so many ways to set an extent so be sure to look at the samples in the Camera class too.&lt;/P&gt;&lt;P&gt;MapView Class:&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/mapview-class.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/mapview-class.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Camera Class:&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/camera-class.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/camera-class.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you need help with a specific scenario, please provide more detail.&lt;/P&gt;&lt;P&gt;Jeff - arcpy.mp and Layout teams&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 16:59:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-export-map-as-geotiff-through-python/m-p/1200906#M58385</guid>
      <dc:creator>JeffreyBarrette</dc:creator>
      <dc:date>2022-08-09T16:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to export Map as GeoTIFF through Python?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-export-map-as-geotiff-through-python/m-p/1201807#M58496</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your answer! It worked well. One follow-up question: I've been able to zoom into specific rectangular locations by modifying Extent.XMin, XMax, YMin, and YMax (where smaller differences between the max/min values seem to zoom in more), but I'm not sure how to interpret those four values or what they represent. Is there a way to convert them to standard latitude and longitude values and vice versa?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 10:22:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-export-map-as-geotiff-through-python/m-p/1201807#M58496</guid>
      <dc:creator>ssK_0</dc:creator>
      <dc:date>2022-08-11T10:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to export Map as GeoTIFF through Python?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-export-map-as-geotiff-through-python/m-p/1202045#M58528</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;The X/Y Min/Max values represent a rectangle like you suggest.&amp;nbsp; Rectangles are just one way of controlling extent and are not always the best.&amp;nbsp; For example, if the data in a map frame is rotated, the extent that gets returned will not match what you see in the UI because a rotated rectangle has a larger extent.&amp;nbsp; There are other techniques for zooming to a layer, selected features in a layer, etc.&lt;/P&gt;&lt;P&gt;Check out the first sample located in the MapFrame help topic. The same logic will work with a MapView.&amp;nbsp; The second parameter is to use the layers's selection.&amp;nbsp; if False, use all features, if True, use selection.&amp;nbsp; So you can first perform a SelectLayerByAttributes or ByLocation to create a selection and then use the selection to control your zoom level.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;mf.camera.setExtent(mf.getLayerExtent(lyr, &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;False&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;True&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/mapframe-class.htm" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/mapframe-class.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 17:21:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-export-map-as-geotiff-through-python/m-p/1202045#M58528</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2022-08-11T17:21:08Z</dc:date>
    </item>
  </channel>
</rss>

