[OKGIS] Programming Question

David Lowther dlowther at coordinatesolutions.com
Thu Feb 7 12:54:53 CST 2008


Paul,

 

Given the following scenario, the steps below should get you where you are
going.

 

You have a data layer that has (or will have) the following fields: Region,
Pop, and RegionPop. You are looking for a way to calculate each state's
RegionalPop to equal the sum of the states' Pop grouped by a Region column. 

 

Steps:

Open the layer's attribute table.
Right-click the Region field and choose Summarize.
- the field to summarize should be Region
- expand the Pop field under step 2 and put a check next to Sum.
- say OK, and then Yes to add the table to the map.
Right-click the table that you just created and choose Open. 
- This should have your desired RegionPop values.
Right-click the original layer and choose Joins and Relates -> Join...
- 1 - Region
- 2 - the name of the table you created above.
- 3 - Region
- say OK - now you will see both the layer's fields and the table's fields.
Right-click on layername.RegionPop in the attribute table and choose Field
Calculator. Say OK to the nag screen.
- double click tablename.Sum_Pop and say OK.
Right-click the layer in the table of contents and choose Joins and Relates
-> Remove Joins -> Remove All Joins...

 

Hope that helps,

 

David Lowther 

 

Coordinate Solutions, Inc.

904.471.5528 (Voice)

405.210.1721 (Mobile)

904.471.5548 (Fax)

www.coordinatesolutions.com

 

 

  _____  

From: okgis-bounces at gis.gis.ou.edu [mailto:okgis-bounces at gis.gis.ou.edu] On
Behalf Of Paul Rodden
Sent: Thursday, February 07, 2008 12:24 PM
To: Oklahoma GIS Community
Subject: [OKGIS] Programming Question

 

To all you GIS programming guru's out there I have a question.  I want to
take multiple records in a column and add the data together in a new column.
An example of this would be, say, a feature class of the US with states and
total population of the states and wanting to set up a new column in that
feature class that would have the total population by region (Southwest,
Northwest, etc...).  I've tried EDN but to no avail.  The actual data that
I'm working with is string, but it should still work the same (as in adding
two string fields).  Does anyone have any ideas?  I would appreciate any and
all help.  Thanks.

Paul Rodden
Senior GIS Analyst
City of Mesquite

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gis.ou.edu/pipermail/okgis/attachments/20080207/cb633e2d/attachment.htm


More information about the OKGIS mailing list