<?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: Python Scripting in New to GIS Questions</title>
    <link>https://community.esri.com/t5/new-to-gis-questions/python-scripting/m-p/30462#M49</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Closed.&amp;nbsp; This thread was mislocated.&lt;/P&gt;&lt;P&gt;Good requirement list.&amp;nbsp; Just needs to have progress identified and indicated or post on &lt;A href="https://community.esri.com/group/1314"&gt;GIS Jobs&lt;/A&gt; if others are to do the work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 05 Dec 2015 23:53:36 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2015-12-05T23:53:36Z</dc:date>
    <item>
      <title>Python Scripting</title>
      <link>https://community.esri.com/t5/new-to-gis-questions/python-scripting/m-p/30461#M48</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Requesting for a help if someone could help me on this. Below is the set of requirements. Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;I want write a script that will allow users to batch clip all the featureclasses in a workspace. The workspace can be a folder containing shapefiles or a geodatabase. The script should also contain a test so that it does not clip the clipping features.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 12pt;"&gt;The clipped featureclasses will be named using the base name of the input features plus an underscore with an appended value. The appended value can be obtained from a field in the clipping features or from a user supplied value. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script will be more generic in that the clipping features may contain more than one feature and the user can select a subset of the features to use for the clipping. For example, the user can select the County layer as the clipping features, and then select X Township from the County layer to do the clipping. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will need to test two Boolean inputs. One to see if a subset of clipping features is selected and another to see if the append value is obtained from a field or if the user inputs the value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="7" cellspacing="0" style="width: 656px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="11" width="33%"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-size: 12pt; font-family: Times New Roman,Times New Roman;"&gt;Input &lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="11" width="33%"&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;P&gt;Data Type &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="11" width="33%"&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;P&gt;Type &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="10" width="33%"&gt;&lt;P&gt;Input workspace &lt;/P&gt;&lt;/TD&gt;&lt;TD height="10" width="33%"&gt;&lt;P&gt;Folder or feature dataset &lt;/P&gt;&lt;/TD&gt;&lt;TD height="10" width="33%"&gt;&lt;P&gt;Required &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="10" width="33%"&gt;&lt;P&gt;Clipping features &lt;/P&gt;&lt;/TD&gt;&lt;TD height="10" width="33%"&gt;&lt;P&gt;Featureclass &lt;/P&gt;&lt;/TD&gt;&lt;TD height="10" width="33%"&gt;&lt;P&gt;Required &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" width="33%"&gt;&lt;P&gt;Select subset of clipping features? &lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="33%"&gt;&lt;P&gt;Boolean &lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="33%"&gt;&lt;P&gt;Required with a default value &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" width="33%"&gt;&lt;P&gt;SQL to select the subset &lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="33%"&gt;&lt;P&gt;SQL statement, from clipping features &lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="33%"&gt;&lt;P&gt;Optional &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" width="33%"&gt;&lt;P&gt;Append value from a field or user input &lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="33%"&gt;&lt;P&gt;Boolean &lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="33%"&gt;&lt;P&gt;Required with a default value &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" width="33%"&gt;&lt;P&gt;Field from which to obtain append value &lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="33%"&gt;&lt;P&gt;Field, from clipping features &lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="33%"&gt;&lt;P&gt;Optional &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="10" width="33%"&gt;&lt;P&gt;User input string &lt;/P&gt;&lt;/TD&gt;&lt;TD height="10" width="33%"&gt;&lt;P&gt;String &lt;/P&gt;&lt;/TD&gt;&lt;TD height="10" width="33%"&gt;&lt;P&gt;Optional &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 12pt;"&gt;I want to use base name of the features that are being clipped using the .baseName method on a describe object instead of using the .name method to negate having to test if the features class is a shapefile and then removing the .shp extension. For example; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;featureClassDescription = arcpy.Describe(featureClass) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;featureclassBasename = featureClassDescription.baseName &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;featureClassDescription = arcpy.Describe(featureClass) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;featureclassBasename = featureClassDescription.name&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 21:52:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/new-to-gis-questions/python-scripting/m-p/30461#M48</guid>
      <dc:creator>NarayanKhatiwada1</dc:creator>
      <dc:date>2014-11-11T21:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Python Scripting</title>
      <link>https://community.esri.com/t5/new-to-gis-questions/python-scripting/m-p/30462#M49</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Closed.&amp;nbsp; This thread was mislocated.&lt;/P&gt;&lt;P&gt;Good requirement list.&amp;nbsp; Just needs to have progress identified and indicated or post on &lt;A href="https://community.esri.com/group/1314"&gt;GIS Jobs&lt;/A&gt; if others are to do the work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Dec 2015 23:53:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/new-to-gis-questions/python-scripting/m-p/30462#M49</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-12-05T23:53:36Z</dc:date>
    </item>
  </channel>
</rss>

