<?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 Calculate Field Based on Feature Attr Value in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/calculate-field-based-on-feature-attr-value/m-p/130180#M4517</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a shapefile that has a column of data (the "area" of the polygons) that I would like to use in calculating another column, call the other column "ratio." The data/features are pre-sorted in descending order based on the area; the first feature having FID = 0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the "ratio" column I want to calculate the field, or cells for each feature like so:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;~something like this~&amp;nbsp; "ratio" = area/FID[0].area.value&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So that the resulting value is a ratio of the biggest "area" to the "area" of each other feature, i.e.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FID____AREA____RATIO&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0______ 10 _____ 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1______ 8 ______ .8&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2______ 6 ______ .6&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3______ 4 ______ .4&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and so on...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is my above approach workable or is there another/better way?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Sep 2010 21:02:43 GMT</pubDate>
    <dc:creator>KeithSandell</dc:creator>
    <dc:date>2010-09-08T21:02:43Z</dc:date>
    <item>
      <title>Calculate Field Based on Feature Attr Value</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/calculate-field-based-on-feature-attr-value/m-p/130180#M4517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a shapefile that has a column of data (the "area" of the polygons) that I would like to use in calculating another column, call the other column "ratio." The data/features are pre-sorted in descending order based on the area; the first feature having FID = 0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the "ratio" column I want to calculate the field, or cells for each feature like so:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;~something like this~&amp;nbsp; "ratio" = area/FID[0].area.value&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So that the resulting value is a ratio of the biggest "area" to the "area" of each other feature, i.e.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FID____AREA____RATIO&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0______ 10 _____ 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1______ 8 ______ .8&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2______ 6 ______ .6&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3______ 4 ______ .4&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and so on...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is my above approach workable or is there another/better way?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Sep 2010 21:02:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/calculate-field-based-on-feature-attr-value/m-p/130180#M4517</guid>
      <dc:creator>KeithSandell</dc:creator>
      <dc:date>2010-09-08T21:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Field Based on Feature Attr Value</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/calculate-field-based-on-feature-attr-value/m-p/130181#M4518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I got it. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was trying/wanting to just use a straight up expression inside of the Calculate Tool, but instead I'm going to use a SearchCursor to get the value of FID = 0.area and set it as a variable in a python script and then pass in the variable and the remainder of the expression to the Field Calculate method as a parameter.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Sep 2010 00:05:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/calculate-field-based-on-feature-attr-value/m-p/130181#M4518</guid>
      <dc:creator>KeithSandell</dc:creator>
      <dc:date>2010-09-09T00:05:10Z</dc:date>
    </item>
  </channel>
</rss>

