<?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: Output Extent in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/output-extent/m-p/276647#M9526</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Oops!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the attachment &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":face_with_open_mouth:"&gt;😮&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Aug 2012 16:33:14 GMT</pubDate>
    <dc:creator>EricStarn2</dc:creator>
    <dc:date>2012-08-09T16:33:14Z</dc:date>
    <item>
      <title>Output Extent</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/output-extent/m-p/276644#M9523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to set the final extent of a map based on one of your outputs in a model?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If so how&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Eric&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2012 11:27:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/output-extent/m-p/276644#M9523</guid>
      <dc:creator>EricStarn2</dc:creator>
      <dc:date>2012-08-09T11:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: Output Extent</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/output-extent/m-p/276645#M9524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You need to describe the model output data set.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;describeObject = Describe(r"c:\ModelWork.gdb\ModelOutput")&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;from the describe object you can get the extent object, &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;extentObject = describeObject.extent&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;which has the following properties:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;XMin, YMin, XMax, YMax, ZMin, ZMax, MMin, MMax&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;all as double precision numbers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;xMin = extentObject.XMin&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;It will also give you the corners as point objects.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The dataframe object in the map has an extent object too, which can be set using these values.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you make a python list of the dataset x and y extent values, such as this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;extent = [xMin, yMin, xMax, yMax],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;then you could set the dataframe extent values like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;##&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set extent
df = arcpy.mapping.ListDataFrames(mxd, theFrame)[0]
newExtent = df.extent
newExtent.XMin = extent[0]
newExtent.YMin = extent[1]
newExtent.XMax = extent[2]
newExtent.YMax = extent[3]
df.extent = newExtent
del newExtent

##&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set extent a second time - v10 bug workaround
df2 = arcpy.mapping.ListDataFrames(mxd, theFrame)[0]
anotherExtent = df2.extent
anotherExtent.XMin = extent[0]
anotherExtent.YMin = extent[1]
anotherExtent.XMax = extent[2]
anotherExtent.YMax = extent[3]
df2.extent = anotherExtent
del anotherExtent&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I set it twice here because there is a bug in version 10.0 that sometimes ignores the code setting the dataframe extent.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:28:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/output-extent/m-p/276645#M9524</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2021-12-11T13:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: Output Extent</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/output-extent/m-p/276646#M9525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the quick reply but you just threw a fastball right by me. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I may need a little more explanation&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The model I am making is going to be used as a Geoprocessing service, if this matters.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have attached an image of an example of a model with the basics of what I am trying to do.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am hoping to eventually build a widget for a viewer to run this process and would like the output results to be zoomed to.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However I am not entirely sure if this is something that I should do in the model or if this is a parameter for the widget.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So your opinion or any help you could provide would be great.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Eric&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2012 16:17:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/output-extent/m-p/276646#M9525</guid>
      <dc:creator>EricStarn2</dc:creator>
      <dc:date>2012-08-09T16:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Output Extent</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/output-extent/m-p/276647#M9526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Oops!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the attachment &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":face_with_open_mouth:"&gt;😮&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2012 16:33:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/output-extent/m-p/276647#M9526</guid>
      <dc:creator>EricStarn2</dc:creator>
      <dc:date>2012-08-09T16:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: Output Extent</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/output-extent/m-p/276648#M9527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;A geoprocessing model does just that: it geo-processes data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When you talk about "map extents" and "zooming", you are dealing with graphic expressions of data: maps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is not entirely clear which you are wanting to obtain as a result: a data set or a map. Your subsquent expalnations raise doubts about my original understanding of your question.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My suggestions pertain to creating a map with map extents matching the extents of the data set output from the geoprocessing&amp;nbsp; model / script / service. For that, you need to go through the python arcpy.mapping module, and to have set up (at least a rudementary) mxd, so as to compose and output the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If, on the other hand, you are using the term " final extent of a map" to mean "extent of a data set", then most of what I wrote is entirely beside the point.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 11:41:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/output-extent/m-p/276648#M9527</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2012-08-10T11:41:12Z</dc:date>
    </item>
  </channel>
</rss>

