<?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: interior buffer in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/interior-buffer/m-p/198091#M6783</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I implemented something like this with the ArcSDE 'C' API.&amp;nbsp; There's a couple of issues to track:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;You need to iterate negative buffers on each shape (I kept splitting the difference between a "too large" buffer and a "too small" one until the the area was within 2% or my target)&lt;/LI&gt;&lt;LI&gt;The distance to shrink any one shape can be very different&amp;nbsp; across rows (I started with a&amp;nbsp; distance that corresponded to the radius difference of a perfect circle, and let it shrink by a fixed fraction until "too small", then tried to home in on the optimal solution).&lt;/LI&gt;&lt;LI&gt;You can make your threshold very precise, but the number of iterations will increase significantly (and depending on the coordinate reference precision, it might not be possible to meet the threshold criteria, so be sure to impose a constant limit [e.g., 5000 reps] to avoid an infinite loop).&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: In the future, you may want to post this "In a Place" (like Managing Data) instead of relying on it being found in your personal discussion space based on nominal notification and keyword tags.&amp;nbsp; You also might want to add "geodatabase" and "geometry" tags.&amp;nbsp; You can move a discussion/question to a place by clicking on the title, then using the "Move" option off to the right.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Oct 2014 18:43:22 GMT</pubDate>
    <dc:creator>VinceAngelo</dc:creator>
    <dc:date>2014-10-17T18:43:22Z</dc:date>
    <item>
      <title>interior buffer</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/interior-buffer/m-p/198090#M6782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;conceptually this doesn't seem hard, but i can't figure out how to do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have 700 building footprints.&amp;nbsp; i am trying to show what it would look like if 35% (or $40% or 70% etc) of each building footprint had a green roof on it.&amp;nbsp; i did some research and tried using a parcel fabric.&amp;nbsp; that didn't work because while it did allow me to split the buildings into equal parts, i couldn't specify a percentage.&amp;nbsp; also, you had to split each footprint individually - i am looking for something that will allow me to do it all at once.&amp;nbsp; next i though about using an interior buffer.&amp;nbsp; if i can calculate the distance of a buffer to "eliminate" 65% of a building footprint (so that 35% remains) that could work.&amp;nbsp; however, i am not a math/geometry wiz - how would one go about calculating the distance of a buffer as i described above?&amp;nbsp; baring that, is there another approach i am missing?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2014 18:09:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/interior-buffer/m-p/198090#M6782</guid>
      <dc:creator>JayMukherjee</dc:creator>
      <dc:date>2014-10-17T18:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: interior buffer</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/interior-buffer/m-p/198091#M6783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I implemented something like this with the ArcSDE 'C' API.&amp;nbsp; There's a couple of issues to track:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;You need to iterate negative buffers on each shape (I kept splitting the difference between a "too large" buffer and a "too small" one until the the area was within 2% or my target)&lt;/LI&gt;&lt;LI&gt;The distance to shrink any one shape can be very different&amp;nbsp; across rows (I started with a&amp;nbsp; distance that corresponded to the radius difference of a perfect circle, and let it shrink by a fixed fraction until "too small", then tried to home in on the optimal solution).&lt;/LI&gt;&lt;LI&gt;You can make your threshold very precise, but the number of iterations will increase significantly (and depending on the coordinate reference precision, it might not be possible to meet the threshold criteria, so be sure to impose a constant limit [e.g., 5000 reps] to avoid an infinite loop).&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: In the future, you may want to post this "In a Place" (like Managing Data) instead of relying on it being found in your personal discussion space based on nominal notification and keyword tags.&amp;nbsp; You also might want to add "geodatabase" and "geometry" tags.&amp;nbsp; You can move a discussion/question to a place by clicking on the title, then using the "Move" option off to the right.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2014 18:43:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/interior-buffer/m-p/198091#M6783</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2014-10-17T18:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: interior buffer</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/interior-buffer/m-p/198092#M6784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks vince.&amp;nbsp; also for the part about how to post.&amp;nbsp; this forum still confuses me!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2014 19:42:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/interior-buffer/m-p/198092#M6784</guid>
      <dc:creator>JayMukherjee</dc:creator>
      <dc:date>2014-10-17T19:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: interior buffer</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/interior-buffer/m-p/198093#M6785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Along the lines of Vince's suggestion, here is a python script that goes most of the way there. The script below is a python script tool - change polyFC and outBuffs to file paths of your choice. The algorithm is more coarse than what Vince suggests - it merely shrinks the buffers by the distance specified in the increment variable, until it passes the threshold specified in the testPercent variable. The use of geometry objects allows for buffers on a feature by feature basis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14135826319875514" jivemacro_uid="_14135826319875514" modifiedtitle="true"&gt;
&lt;P&gt;# import libraries&lt;/P&gt;
&lt;P&gt;import arcpy&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# set input/output parameters&lt;/P&gt;
&lt;P&gt;polyFC = arcpy.GetParameterAsText(0)&amp;nbsp;&amp;nbsp;&amp;nbsp; # input polygons&lt;/P&gt;
&lt;P&gt;outBuffs = arcpy.GetParameterAsText(1)&amp;nbsp; # output interior buffers&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# percentage of interest&lt;/P&gt;
&lt;P&gt;testPercent = 0.35&lt;/P&gt;
&lt;P&gt;# increment to shrink buffers&lt;/P&gt;
&lt;P&gt;increment = -0.1 # e.g. 10cm&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# buffers container&lt;/P&gt;
&lt;P&gt;buffs = []&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;def negBuff(geom, dist, origArea):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # apply negative buffer&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; buffGeom = geom.buffer(dist)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; buffArea = buffGeom.area&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # test against percentage of interest&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # if less than percentage, add to array&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # if not, increase buffer and try again&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if buffArea/origArea &amp;lt; testPercent:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; buffs.append(buffGeom)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; negBuff(geom, dist + increment, origArea)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;for row in arcpy.da.SearchCursor(polyFC, ["SHAPE@"]):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # calculate original area&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; origArea = row[0].area&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # run buffers&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; negBuff(row[0], increment, origArea)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# persist geometry objects&lt;/P&gt;
&lt;P&gt;arcpy.CopyFeatures_management(buffs, outBuffs)&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2014 21:55:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/interior-buffer/m-p/198093#M6785</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2014-10-17T21:55:32Z</dc:date>
    </item>
  </channel>
</rss>

