Extract Data from Atrribute Table of Shape File to do further Calculations

771
2
12-20-2011 04:21 AM
FlorianPattis
New Contributor
Hello im a beginner of Arcgisand i have following problem

I have a shapefile where i need to some calculations. In the shapefile there are attributes (Area in m², Irradiance in W/m² and temperature in °C???) and I have to do a multiplication. I can do It manual by adding a new field and type in the expression :  Power=Area*Irradiance.
But I need to do this for a lot of entrys and so I want to make a process in the model builder.  How can I extract the data in the attribute table to do the calculations and add a field at the end of the attribute table with the calculated power?

thanks for your help in advance

flo
0 Kudos
2 Replies
RichardFairhurst
MVP Honored Contributor
Hello im a beginner of Arcgisand i have following problem

I have a shapefile where i need to some calculations. In the shapefile there are attributes (Area in m², Irradiance in W/m² and temperature in °C�?�) and I have to do a multiplication. I can do It manual by adding a new field and type in the expression :  Power=Area*Irradiance.
But I need to do this for a lot of entrys and so I want to make a process in the model builder.  How can I extract the data in the attribute table to do the calculations and add a field at the end of the attribute table with the calculated power?

thanks for your help in advance

flo


The Add Field operation can be done with the Add Field tool under the Fields section of the Data Management toolset group.  This tool only needs to be used once for a given field on a given feature class/table.  If the data source is being recreated without the field each time you need to run the script than it can be part of the script that calculates the field.  Otherwise, it needs to be done in its own script and only run if the field has been dropped.

The rest of the script is simply to first use the Make Feature Layer tool under the Layers and Tableviews section of the Data Management group and the Field Calculator tool under the Fields section of the Data Management group to perform the calculation.  If you only want to calculate a selected set of records, you can use the Select By Attribute tool under the Layers and Tableviews section of the Data Management group between those two tools.
0 Kudos
FlorianPattis
New Contributor
Thank you for your help..it took me some time to figure it out but now it works!
0 Kudos