<?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: land use change by percentage in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/land-use-change-by-percentage/m-p/131874#M10240</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I have a land use shapefile that I am trying to modify in python. I have created a buffer around surface water polygons and I want to convert a percentage of the land use types that fall within the buffer to a specific land use. For example, within a 100m buffer of my stream I want to ensure that at least 10% of the region is 'naturally vegetated'. If it is not, then I want to convert 10% of changeable land (i.e. row crops) to 'vegetated'. If anyone could assist me with this one, it would be greatly appreciated.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;&lt;BR /&gt;Bethany&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank-you Nobbir, this work flow has been very helpful:)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jun 2012 18:53:22 GMT</pubDate>
    <dc:creator>BethanyNoordegraaf</dc:creator>
    <dc:date>2012-06-13T18:53:22Z</dc:date>
    <item>
      <title>land use change by percentage</title>
      <link>https://community.esri.com/t5/python-questions/land-use-change-by-percentage/m-p/131872#M10238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a land use shapefile that I am trying to modify in python. I have created a buffer around surface water polygons and I want to convert a percentage of the land use types that fall within the buffer to a specific land use. For example, within a 100m buffer of my stream I want to ensure that at least 10% of the region is 'naturally vegetated'. If it is not, then I want to convert 10% of changeable land (i.e. row crops) to 'vegetated'. If anyone could assist me with this one, it would be greatly appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bethany&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 12:32:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/land-use-change-by-percentage/m-p/131872#M10238</guid>
      <dc:creator>BethanyNoordegraaf</dc:creator>
      <dc:date>2012-06-11T12:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: land use change by percentage</title>
      <link>https://community.esri.com/t5/python-questions/land-use-change-by-percentage/m-p/131873#M10239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try this workflow:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Add a field ORIG_AREA of type Double to your buff_water. In the attribute table, right-click on ORIG_AREA and select Field Calculator. Set ORIG_AERA equal to Shape_Area. I'm making a duplicate of the Shape area for use in a later step.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Use Make Feature Layer to make a layer from your vegetation polygons (even if you are in ArcMap). Pay special attention to Field Info parameter and don't forget to check mark the Use Ratio Policy for Shape field (see screenshot below). Name the output as vegetation_Layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]15119[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Run Clip tool with with buff_water as input and vegetation_Layer as clip features. Name the output of Clip as buff_water_Clip. This output will look like vegetation layer but will contain attributes of buff_water.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Add a field VEG_RATIO of type Double to buff_water_Clip. This field will contain the percentage of vegetation in each buff_water polygon - here is how you calculate the percentage.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Open the attribute table of buff_water_Clip. Right-click on VEG_RATIO field and select Field Calculator ... &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Select Python as parser.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In the code block set VEG_RATIO as:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;( !Shape_Area!/ !ORIG_AREA!) * 100&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Add another field called VEG_TYPE of type TEXT/string to buff_water_Clip table. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now calculate VEG_TYPE using Calculate Field tool. Open Calculate Field tool and set parameter values using the screenshot below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]15118[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In case the image is not clear, use this as Expression:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;calc_veg_type(!VEG_RATIO!)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Use use this chunk of code in Code Block section - change the return value as per your requirements:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;def calc_veg_type(field): &amp;nbsp;&amp;nbsp;&amp;nbsp; if field &amp;gt;= 10.0: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 'Vegetated' &amp;nbsp;&amp;nbsp;&amp;nbsp; return 'Not vegetated'&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 22:38:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/land-use-change-by-percentage/m-p/131873#M10239</guid>
      <dc:creator>NobbirAhmed</dc:creator>
      <dc:date>2012-06-11T22:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: land use change by percentage</title>
      <link>https://community.esri.com/t5/python-questions/land-use-change-by-percentage/m-p/131874#M10240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I have a land use shapefile that I am trying to modify in python. I have created a buffer around surface water polygons and I want to convert a percentage of the land use types that fall within the buffer to a specific land use. For example, within a 100m buffer of my stream I want to ensure that at least 10% of the region is 'naturally vegetated'. If it is not, then I want to convert 10% of changeable land (i.e. row crops) to 'vegetated'. If anyone could assist me with this one, it would be greatly appreciated.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;&lt;BR /&gt;Bethany&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank-you Nobbir, this work flow has been very helpful:)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2012 18:53:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/land-use-change-by-percentage/m-p/131874#M10240</guid>
      <dc:creator>BethanyNoordegraaf</dc:creator>
      <dc:date>2012-06-13T18:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: land use change by percentage</title>
      <link>https://community.esri.com/t5/python-questions/land-use-change-by-percentage/m-p/131875#M10241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Glad to know &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If that solves your question, could you mark the thread as 'Answered'?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2012 19:12:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/land-use-change-by-percentage/m-p/131875#M10241</guid>
      <dc:creator>NobbirAhmed</dc:creator>
      <dc:date>2012-06-13T19:12:41Z</dc:date>
    </item>
  </channel>
</rss>

