<?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: arcpy.Clip_management having different output from using Python and not in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-clip-management-having-different-output-from/m-p/367367#M28979</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;note clear in the first image you set the extent to decimal degree coordinates, but you are using an albers (projected) file.&amp;nbsp; Can you confirm the extents in both files as to whether were selected from the layer or typed in and whether in file being clipped has the same coordinates as the clipping file&lt;/P&gt;&lt;P&gt;PS I would check the effect of the checkbox ... maintain clipping extent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Apr 2016 18:53:57 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2016-04-06T18:53:57Z</dc:date>
    <item>
      <title>arcpy.Clip_management having different output from using Python and not</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-clip-management-having-different-output-from/m-p/367366#M28978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use the Clip in the Raster Processing to clip some grid from a raster file. But the outputs are different from using Python or not.&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
import os
from arcpy import env


# Set environment settings
env.workspace = "C:/data"


# Clip the layer, remove the points located outside of Texas boundary
output_path="C:/NDVI/2012/"


# Read datafiles for clip
in_path = "C:/NDVI_data/2012/MOD13A3_out/"
shp_list = []
date_id = []
tile_id = []
for dirpath, dirnames, files in os.walk(in_path):
for f in files:
&amp;nbsp; if f.lower().endswith("_reproj.dat"):
&amp;nbsp;&amp;nbsp; fullpath = os.path.join(dirpath, f)
&amp;nbsp;&amp;nbsp; shp_list.append(fullpath)
&amp;nbsp;&amp;nbsp; date_id.append(f[9:16])
&amp;nbsp;&amp;nbsp; tile_id.append(f[17:23])


# Count the elements in shp_list
N=len(shp_list)


# Clip raster
for i in range(0,1):
in_raster = shp_list&lt;I&gt;&lt;/I&gt;
out_feature = "NDVI_clip"+date_id&lt;I&gt;+tile_id&lt;I&gt;&lt;/I&gt;&lt;/I&gt;
Rectangle = "-106.928314 25.611530 -93.605938 35.355261"
Clip_feature = "C://PM_Site/IMPROVE_2011_1km_albers.shp"
arcpy.Clip_management(in_raster,Rectangle,out_feature, Clip_feature,"-999","ClippingGeometry","MAINTAIN_EXTENT")&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the output looks like this:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="194117" class="image-1 jive-image" height="371" src="https://community.esri.com/legacyfs/online/194117_pastedImage_3.png" style="height: 371px; width: 498.531px;" width="499" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if I don't use the Python.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="194119" class="image-2 jive-image" height="331" src="https://community.esri.com/legacyfs/online/194119_pastedImage_5.png" style="height: 332px; width: 378.688px;" width="379" /&gt;&lt;/P&gt;&lt;P&gt;The output is looks like this:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="194120" class="image-3 jive-image" height="378" src="https://community.esri.com/legacyfs/online/194120_pastedImage_6.png" style="width: 503px; height: 378.061px;" width="503" /&gt;&lt;/P&gt;&lt;P&gt;Why there are two grids missing by using the Python?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will really appreciate your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sue-ying&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:03:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-clip-management-having-different-output-from/m-p/367366#M28978</guid>
      <dc:creator>XueyingZhang1</dc:creator>
      <dc:date>2021-12-11T17:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.Clip_management having different output from using Python and not</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-clip-management-having-different-output-from/m-p/367367#M28979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;note clear in the first image you set the extent to decimal degree coordinates, but you are using an albers (projected) file.&amp;nbsp; Can you confirm the extents in both files as to whether were selected from the layer or typed in and whether in file being clipped has the same coordinates as the clipping file&lt;/P&gt;&lt;P&gt;PS I would check the effect of the checkbox ... maintain clipping extent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 18:53:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-clip-management-having-different-output-from/m-p/367367#M28979</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-04-06T18:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.Clip_management having different output from using Python and not</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-clip-management-having-different-output-from/m-p/367368#M28980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I'm sure I used the exact same input files. Just the name shows differently because I take the screenshot in different times. Sorry for the confusing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I did checked the two boxess, &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;"ClippingGeometry" and "maintain clipping extent". &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the same input files but the output is different, that confused me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 19:36:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-clip-management-having-different-output-from/m-p/367368#M28980</guid>
      <dc:creator>XueyingZhang1</dc:creator>
      <dc:date>2016-04-06T19:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.Clip_management having different output from using Python and not</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-clip-management-having-different-output-from/m-p/367369#M28981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the tools and inputs are the same but outputs are different, I suggest investigating if the environment settings in ArcMap and in the script environment are script are different. Especially check processing extent, output coordinate system, mask.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2016 05:05:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-clip-management-having-different-output-from/m-p/367369#M28981</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2016-04-07T05:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.Clip_management having different output from using Python and not</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-clip-management-having-different-output-from/m-p/367370#M28982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set your Rectangle variable to "#".&amp;nbsp; You don't need to specify an envelope if you are providing a shp as the clipping extent.&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14600358814006532 jive_text_macro" data-renderedposition="34_8_1332_16" jivemacro_uid="_14600358814006532" modifiedtitle="true"&gt;&lt;P&gt;Rectangle = "#"&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2016 13:32:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-clip-management-having-different-output-from/m-p/367370#M28982</guid>
      <dc:creator>AndrewKeith3</dc:creator>
      <dc:date>2016-04-07T13:32:54Z</dc:date>
    </item>
  </channel>
</rss>

