Sie sind auf Seite 1von 8

Calculating Area Weighted Means with ArcGIS

July 19, 2007 Bongghi Hong and Dennis Swaney

This document describes how the area weighted means can be calculated in rc!"S# S$eci%ically, how gridded data o&erlaid on a ma$ o% multi$le watersheds can be used to create ma$s o% 'area weighted( a&erage &alues %or each watershed# There must be se&eral di%%erent ways o% accom$lishing the goal, but here we use a %reely a&ailable rc!"S e)tension called Hawth*s nalysis Tools 'htt$+,,www#s$atialecology#com,htools,inde)#$h$(+

The $rogram can be downloaded by clic-ing on .download / D01230 D H 1TH*S T003S '&4#25( 607 78!"S 9#)9# :n;i$ the downloaded %ile and double<clic- on .htools=setu$9 and install the tool# 0$en the rc!"S and clic- on .Tools / >)tensions###9 and chec- the .Hawth*s nalysis Tools9 chec-bo)# 2e)t, clic- on .?iew / Toolbars / Hawth*s Tools9 and the Hawth*s nalysis Tools menu bar will a$$ear+

To calculate the area<weighted means, you need two $olygon based ma$s, one containing the &alues to be a&eraged 'in the e)am$le below, .ann=grid=de$osition9 containing &arious 2 de$osition estimates on a grid( and another that wor-s as the ;onal $olygon 'in the e)am$le below, .nebasin=de$osition9 containing watershed boundaries(+

%ter adding these two ma$s, clic- on .HawthsTools / nalysis Tools / @olygon "n @olygon nalysis9 to o$en the tool# 8hoose the boundary ma$ as .Aonal $olygon layer9 and the &alue ma$ as .Summary $olygon layer9# "n the summary o$tions, select . ttribute %ield based summary9 and chec- the &ariables to be a&eraged# Ba-e sure that . rea weighted mean9 is selected as summary statistics and .:se com$lete %ield name9 as %ield naming con&ention+

8lic-ing .0C9 will run the calculation# The result o% the calculation is stored in the ;onal ma$# 0$en the attribute table o% the ;onal ma$ and you can %ind the %ields containing weighted means 'note that in the below e)am$le, the %ield names are identical to the summary %ields selected abo&e(+

The calculated weighted means can also be shown as a ma$+

Map Preparation To run the @olygon "n @olygon nalysis o% the Hawth*s nalysis Tools, you should $ro&ide a &alue ma$ '.ann=grid=de$osition9 in the abo&e e)am$le( containing &ariables to be a&eraged in each column o% the attribute table# @ossible di%%iculties that may arise during the ma$ $re$aration are+ '1( There may be more than one &alue ma$ co&ering the area to be a&eraged D use rcToolbo) .Berge9 tool# 'in our e)am$le, we had 2 se$arate ma$s containing gridded data o&er the northern and southern regions which together contained all data to be a&eraged# These ma$s were merged be%ore $er%orming %urther calculations(# '2( 8olumns containing &ariables to be a&eraged may be located in di%%erent &alue ma$s 'i#e#, stored in di%%erent attribute tables( D use rcToolbo) .:nion9 tool# '4( The &alue ma$ and the ;onal ma$ may ha&e di%%erent $roEections D use rcToolbo) .@roEect9 tool# 2ote that the desired $roEection may be im$orted %rom one o% the ma$s i% desired using the @roEect tool# 'F( The &alues to be a&eraged may be in .string9 %ormat, not in numeric %ormat# Data in string %ormat cannot be analy;ed as numbers 'ie cannot be a&eraged(# D there may be se&eral di%%erent solutions, including manual editing, but this $roblem can be resol&ed e%%iciently while using rcToolbo) .Berge9 tool# Below, we describe a case with all %our o% these $roblems# There are altogether 10 &alue ma$s, %i&e co&ering the region .huc019 and other %i&e co&ering the region .huc029# >ach o% the %i&e ma$s contains 2 de$osition &ariables %or the winter, s$ring, summer, %all, or the yearly sum+

The 2 de$osition &ariables stored in the attribute tables o% these &alue ma$s ha&e .string9 %ormat# The &alue ma$s ha&e .!8S=2orth= merican=19G49 $roEection, whereas the watershed boundary ma$ has .:S =8ontiguous= lbers=>Hual= rea=8onic=:S!S=&ersion9 $roEection# To $re$are a single ma$ o% 2 de$osition, ma$s in the region o% .huc019 and .huc029 were %irst merged %or each season 'i#e#, .huc01annual9 and .huc02annual9, .huc01winter9 and .huc02winter9, etc###( using the rcToolbo) .Berge9 tool 'clic- on .Data Banagement Tools / !eneral / Berge9(+

2ote that some &ariables ha&e .te)t9 %ormat# To con&ert them into numeric %ormat, right<clic- on the &ariable name and select .@ro$erties###9# $ro$erty window will be o$ened, and you can change the &ariable ty$e %rom .te)t9 to .double9+

2ote that the su%%i) .annual9 is added to the &ariable name, so that we will -now that it is re%erring to annual %lu)es a%ter all seasonal ma$s are combined# 1hen the .huc019 and .huc029 ma$s were merged %or each o% the %i&e seasons, these %i&e seasonal ma$s were combined using the rcToolbo) .:nion9 tool 'clic- on . nalysis Tools / 0&erlay / :nion9(+

%ter running the :nion tool, we ha&e a single ma$ .ann=grid=de$osition=un$roE9 containing all the 2 de$osition &alues %or all %i&e seasons 'annual, winter, s$ring, summer, and %all( co&ering both .huc019 and .huc029 regions# Still, this ma$ has a di%%erent $roEection %rom the watershed boundary ma$# This $roblem can be resol&ed by running the rcToolbo) .@roEect9 tool 'clic- on .Data Banagement Tools / @roEections and Trans%ormations / 6eature / @roEect9(+

Ba-e sure that the out$ut coordinate system is set to the same $roEection as that o% the watershed boundary ma$# %ter running the @roEect tool, the resulting .ann=grid=de$osition9 ma$ can be used as the in$ut to the @olygon "n @olygon nalysis o% the Hawth*s nalysis Tools 'see abo&e(# Additional Tips '1( 8o$ying and $asting a IB @ 3 J>7I within rcBa$ is di%%erent %rom co$ying and $asting a IB @I within rc8atalog# "% you want to ma-e a $hysical co$y o% a ma$ 'not a ma$ layer, which only contains the in%ormation o% how the ma$ is $resented(, $er%orm the action using rc8atalog# The same a$$lies when renaming a ma$# '2( 1hen you $er%orm a ma$ calculation 'including using a raster calculator(, the %ollowing may generate an error+ Kma$1LMKma$2L whereas the %ollowing wor-s %ine+ Kma$1L M Kma$2L The di%%erence is in the s$aces between o$erators and &ariables# To ma-e sure that you don*t ha&e this $roblem, always clic- on the o$eration buttons 'e#g#, .M9, .<9, .,9, .I9, etc###( $ro&ided in the calculator instead o% ty$ing them using the -eyboard# '4( The .De%ine @roEection9 tool 'accessible through .Data Banagement Tools / @roEections and Trans%ormations / De%ine @roEection9( is di%%erent %rom the .@roEect9 tool 'accessible through .Data Banagement Tools / @roEections and Trans%ormations / 6eature / @roEect9(# The latter is changing %rom one $roEection to another# The %ormer is de%ining the $roEection o% a ma$ without considering the earlier $roEection# 'F( 1hen using the .De%ine @roEection9 tool, it*s a good idea to s$eci%y the out$ut coordinate system by im$orting one %rom an e)isting ma$ 'clic- on ."m$ort###9(, instead o% trying to %ind the name o% the coordinate system by clic-ing on .Select###9+

Das könnte Ihnen auch gefallen