[OKGIS] Programming Question
Paul Rodden
prodden at gmail.com
Thu Feb 7 12:42:03 CST 2008
So close... had all my data been integer, the summary would have worked.
The problem is that there is no sum function for that field, only a first
and last function. Here is what I am actually doing. I am trying to
populate a field that will hold the sum of text fields from a MAPSCO grid
field (the style of the data would be like 49A-C). The MAPSCO grid is
published mapbook with a grid overlay to identify streets per grid area.
Since many of the streets carry over into different grid numbers, the values
for every street segment may be different. I am wanting to set up a new
field that is populated by the sum of all those grid entries. What I am
wanting is the field to read similar to "49-A49-B49A-C..." as the records
are added together. I hope this gives a better insight as to what I am
wanting to do. But you understand the basic premise perfectly. Thanks for
the help.
Paul
On Feb 7, 2008 11:54 AM, David Lowther <dlowther at coordinatesolutions.com>
wrote:
> 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/770fbe1a/attachment.htm
More information about the OKGIS
mailing list