NAME:PolarPlotsandCircularStatistics
InstallFile:PolarPlots.exe
Lastmodified:June23,2014
TOPICS:Polarplot,Roseplot,CircularStatistics,AngularDeviation,AngularVariance,Mean
ResultantLength
AUTHOR:JeffJenness
WildlifeBiologist,GISAnalyst
JennessEnterprises
3020N.ScheveneBlvd.
Flagstaff,AZ86004USA
Email:jeffj@jennessent.com
WebSite:http://www.jennessent.com)
Phone:19286074638
Description:Thisextensionincludestwotools.BothtoolsareavailableattheArcView(aka
ArcGISBasic)licenselevel.
1. TheShapestoSegmentstoolconvertspolygonorpolylinefeaturesintopolyline
featuresofindividualvertextovertexsegments,withoptionsonvariousgeometric
attributestocalculate(startingandendingcoordinates,length,azimuth).
2. ThePolarPlotstoolcreatesagraphicintheMXDlayoutillustratingthedistribution
ofdirectionvaluesinapolylinefeatureclass(suchasthosegeneratedintheShapes
toSegmentstool)ortable.ThePolarPlotstoolalsohasanoptiontocalculatebasic
circulardescriptivestatisticsondata.
Output:Onetoolproducespolylinefeatureclassesandtheothertoolproducesagraphic
plotintheMXDLayout.
Requires:ArcGIS9.1orbetter,atanylicenselevel.
RevisionHistoryonp.45.
RecommendedCitationFormat:Forthosewhowishtocitethisextension,theauthor
recommendssomethingsimilarto:
Jenness,J.2014.PolarPlotsandCircularStatistics:ExtensionforArcGIS.Jenness
Enterprises.Availableat:http://www.jennessent.com/arcgis/Polar_Plots.htm
Pleaseletmeknowifyoucitethisextensioninapublication(jeffj@jennessent.com).Iwill
updatethecitationlisttoincludeanypublicationsthatIamtoldabout.
Table of Contents
TABLEOFCONTENTS......................................................................................................................4
INSTALLINGTHEPOLARPLOTSANDCIRCULARSTATISTICSEXTENSION.....................................................5
For ArcGIS 9.x ........................................................................................................................................................... 5
For ArcGIS 10.0 ........................................................................................................................................................ 5
Viewing the Tools ...................................................................................................................................................... 8
UNINSTALLINGTHEPOLARPLOTSANDCIRCULARSTATISTICSEXTENSION..............................................10
For ArcGIS 9.x. ........................................................................................................................................................ 10
For ArcGIS 10.0 ...................................................................................................................................................... 10
TROUBLESHOOTING......................................................................................................................12
If Any of the Tools Crash ......................................................................................................................................... 12
Object variable or With block variable not set Error: ............................................................................................. 12
RICHTX32.OCX Error (also comct332.ocx, comdlg32.ocx, mscomct2.ocx, mscomctl.ocx, msstdfmt.dll errors): .. 12
ISSUESWITHDIRECTIONALDATA....................................................................................................16
Azimuths and Geodesic Curves .............................................................................................................................. 16
Graphically Representing Directional Data ............................................................................................................. 17
Analyzing Directional Data: Circular Statistics ........................................................................................................ 20
MeanDirectionandMeanResultantLength.................................................................................................21
VarianceandStandardDeviation:.................................................................................................................22
Other Methods to Analyze Directional Data ............................................................................................................ 24
ClassificationofAspectValues......................................................................................................................24
DeviationsfromaBearing.............................................................................................................................24
SineandCosineTransformations..................................................................................................................24
SPECIALCONSIDERATIONSFORASPECT............................................................................................26
How Aspect is Calculated........................................................................................................................................ 26
Isthisthebestmethodtocalculateaspect?..................................................................................................27
Issues with Aspect ................................................................................................................................................... 27
Solar Insolation: An alternative to Aspect............................................................................................................... 28
ESRIsSolarRadiationTool............................................................................................................................28
Hillshade........................................................................................................................................................30
USINGTHETOOLS........................................................................................................................31
Convert Shapes to Segments ................................................................................................................................. 31
Generate Circular Plots ........................................................................................................................................... 34
PlotStyle........................................................................................................................................................35
DataSourceOptions:.....................................................................................................................................35
PlotandTitleOptions:...................................................................................................................................37
ReferenceLineandLabelOptions:................................................................................................................40
Calculate Descriptive Circular Statistics .................................................................................................................. 43
REVISIONS..................................................................................................................................45
REFERENCES................................................................................................................................46
InstallingthePolarPlotsandCircularStatisticsExtension
For ArcGIS 9.x
FirstcloseArcGISifitisopen.ToolsdonotinstallproperlyifArcGISisrunningduringthe
installation.
InstallthePolarPlotsandCircularStatisticsextensionbydoubleclickingonthefile
PolarPlots.exeandfollowingtheinstructions.Theinstallationroutinewillregisterthe
PolarPlots.dllwithalltherequiredArcMapcomponents.
ThedefaultinstallfolderfortheextensionisnamedPolar_Plotsandislocatedinsidethe
folderProgramFiles\Jennessent.Thisfolderwillalsoincludesomeadditionalfilesandthis
document.
4. ForWindowsXP:DoubleclickthefileMake_Batch_Files.exetocreateregistration
andunregistrationbatchfilesthatareproperlyformattedtoyoursystem.
a. DoubleclickthenewbatchfileRegister_Polar_Plots_Tool.battoregister
thetoolwithArcGIS10.0.
b. Iftheregistrationissuccessful,thenyoushouldseeaRegistration
Succeedednotice.
5. ForWindowsVistaorWindows7:RightclickthefileMake_Batch_Files.exe,andthen
chooseRunasAdministratortocreateregistrationandunregistrationbatchfilesthat
areproperlyformattedtoyoursystem.
6. RightclickthenewbatchfileRegister_Polar_Plots_Tool.bat,andthenchoose
RunasAdministratortoregisterallthetoolswithArcGIS10.0.
7. Iftheregistrationissuccessful,thenyoushouldseeaRegistrationSucceeded
notice.
Note:Fortheconcernedorcurious,thebatchfileRegister_Polar_Plots_Tool.bat
containsasinglelineoftextthatlookssimilartothefollowing:
"C:\Program Files (x86)\Common Files\ArcGIS\bin\ESRIRegAsm.exe" /p:Desktop
"C:\Program Files (x86)\Jennessent\Polar_Plots\PolarPlots.dll" /f:"C:\Program
Files (x86)\Jennessent\Polar_Plots\PolarPlots.reg"
ItdirectstheESRIinstallerESRIRegAsmtoregistertheextensionDLLPolarPlots.dllwithin
ArcGIS,usingGUIDandClassIDvaluesfromtheregistryfilePolarPlots.reg(alsolocated
inyourinstallationdirectory).BothRegister_Polar_Plots_Tool.batandPolarPlots.reg
maybeopenedandviewedusingstandardtexteditorssuchasNotepadorWordPad.
Finally,simplydragtheConvertShapestoSegmentsand/orthePolarPlotcommandsoutof
theCustomizedialogupintoanyoftheexistingArcGIStoolbars.
UninstallingthePolarPlotsandCircularStatisticsExtension
For ArcGIS 9.x.
1) CloseArcGISifitisopen.
2)ClicktheStartbutton.
3) OpenyourControlPanel.
4) DoubleclickAddorRemovePrograms.
5) ScrolldowntofindandselectPolarPlotsandCircularStatistics.
6) ClicktheRemovebuttonandfollowthedirections.
3) FindthefileUnregister_Polar_Plots_Tool.bat.IFYOUDONOTSEETHISFILE,use
theMake_Batch_Files.exetooltocreatethebatchfile.RefertoStep4inInstalling
10
thePolarPlotsandCircularStatisticsExtensionaboveforinstructionsonhowto
usethistool.
4) ForWindowsXP:DoubleclickthefileUnregister_Polar_Plots_Tool.batto
unregisterthetoolwithArcGIS10.0.
ForWindowsVistaandWindows7:Rightclickthefile
Unregister_Polar_Plots_Tool.batandselectRunasAdministratortounregisterthe
toolwithArcGIS10.0.
Iftheunregistrationissuccessful,thenyoushouldseeanUnregistration
Succeedednotice.
5) ClicktheStartbutton.
6) OpenyourControlPanel.
7) DoubleclickAddorRemovePrograms.
8) ScrolldowntofindandselectPolarPlotsandCircularStatistics10.
9) ClicktheUninstallbuttonandfollowthedirections.
Note:Fortheconcernedorcurious,thebatchfileUnregister_Polar_Plots_Tool.batcontains
somethingsimilartothefollowingsinglelineoftext:
"C:\Program Files\Common Files\ArcGIS\bin\ESRIRegAsm.exe" /p:Desktop /u
"C:\Program Files\Jennessent\Polar_Plots\PolarPlots.dll"
ItdirectstheESRIinstallerESRIRegAsmtounregistertheDLLPolarPLots.dllwithinArcGIS.
Unregister_Polar_Plots_Tool.batmaybeopenedandviewedusingstandardtexteditors
suchasNotepadorWordPad.
11
Troubleshooting
If Any of the Tools Crash
Ifatoolcrashes,youshouldseeadialogthattellsuswhatscriptcrashedandwhereit
crashed.Iwouldappreciateitifyoucouldcopythetextinthatdialog,orsimplytake
screenshotsofthedialogandemailthemtomeatjeffj@jennessent.com.Note:Please
makesurethatthelinenumbersarevisibleinthescreenshots!Thelinenumbersare
locatedonthefarrightsideofthetext.Usethescrollbaratthebottomofthedialogto
makethelinenumbersvisible.
Orifyouseeasimilarerrorstatingthatoneormoreofthefilescomct332.ocx,
comdlg32.ocx,mscomct2.ocx,mscomctl.ocxormsstdfmt.dllaremissingorinvalid,then
simplyfollowtheinstructionsforRICHTX32.OCXbelow,butsubstitutetheappropriatefile
forRICHTX32.OCX.
ThiserrorisalmostalwaysduetothefactthatnewinstallationsofWindows7andWindows
Vistadonotincludeafilethattheextensionexpectstofind.Forexample,thefile
richtx32.ocxisactuallytheRichTextBoxcontrolthatappearsonsomeoftheextension
dialogs.TheotherOCXfilesrefertoothercommoncontrolsthatmightappearonthe
variousextensiondialogs.
Thesolutionistomanuallyinstallthemissingfile(richtx32.ocx)yourself.Hereishowtodo
it:
1) OpenWindowsExplorerandlocatethefilerichtx32.ocxinyourextension
installationfile.
2) Ifyouarerunninga32bitversionofWindows,thencopyrichtx32.ocxtothe
directory
C:\Windows\System32\
Ifyouarerunninga64bitversionofWindows,thencopyrichtx32.ocxtothe
directory
C:\Windows\SysWOW64\
12
3) OpenanElevatedCommandPromptwindow.ThisisthestandardWindows
CommandPromptwindow,butwithadministrativeprivilegesenabled.Youneed
theseprivilegesenabledinordertoregistertheOCXwithWindows.Note:The
ElevatedCommandPromptopensupinthe..\windows\system32directory,not
the..\Users\[UserName]directory.Thewindowtitlewillalsobeginwiththeword
Administrator:
a. Method1:ClicktheStartbutton,thenAllPrograms,thenAccessoriesand
thenrightclickonCommandPromptandselectRunasAdministrator.
b. Method2:ClicktheStartbutton,andthenclickontheSearchProgramsand
Filesbox.TypecmdandthenclickCONTROL+SHIFT+ENTERtoopenthe
CommandwindowwithAdministratorprivileges.
FormorehelponopeninganElevatedCommandPrompt,pleasereferto:
http://www.sevenforums.com/tutorials/783elevatedcommandprompt.html
13
http://www.winhelponline.com/articles/158/1/Howtoopenanelevated
CommandPromptinWindowsVista.html
OrsimplydoasearchforElevatedCommandPrompt.
4) Registerthefilerichtx32.ocxusingtheWindowsRegSvrfunction:
a. Ifusinga32bitversionofWindows,typetheline
regsvr32.exe c:\windows\system32\richtx32.ocx
b. Ifusinga64bitversionofWindows,typetheline
regsvr32.exe %windir%\syswow64\richtx32.ocx
c. Click[ENTER]andyoushouldseeamessagethattheregistrationsucceeded.
14
15
16
ThelinefromNewYorkstartsatabearingof34,continuesinastraightlinetheentireway,
butarrivesinMoscowonabearingof130.
Formovementsegmentslessthanafewhundredmiles,andsufficientlyfarawayfromthe
poles,thedifferencebetweenstartingandendingazimuthstendstobenegligible.Forlong
distancesandforanalysisnearthepoles,however,weshouldbeawareofthisphenomenon
andbecarefulabouthowwedefineourdirectionalvalues.
17
Nightingalesplotsshowedvariationbyseason,butthismethodalsoworksverywellfor
displayingdirectionaldata.Forexample,givenasetoftrailsintheSanFranciscoBayarea,
wecanusearoseplottoillustratethegeneralNorthwest/Southeastorientationofthose
trails:
Commonvariationsonthetraditionalroseplotincludesymbolizingthehistogrambinsas
PeaksandValleys,andputtingthebinsontheoutsideofthecircleratherthantheinside.
18
Whenonlyafewdirectionvaluesneedtobedisplayed,youcansimplyshowthebearingsin
acircularplot.
Anotherinterestingmethodisapiecharttypeimagewheretheslicesareshaded
accordingtotheproportionofthedatathatfacesthatparticulardirection:
19
Althoughthislastmethodislesseffectiveatshowingtheshapeofthedistributionasother
methods,itisstillaninterestingstyleofillustrationbecauseitissovisuallyintuitive.Inthe
imageabove,itiseasytoseethattheobservedroostlocationspredominatelyfacetoward
thesoutheast.Thisextensionprovidesmethodstocreatealltheplottypesillustrated
above(seep.34foradescriptionofthetool).Additionalsoftwaretoolscanbefoundwitha
Googlesearch.Fisher(1995:1530)alsodiscussesalternativemethodsforgraphingcircular
data.
135 .Butwhatisthe
2
coincidentallyisequaltothearithmeticmean
meandirectionof359and1?Theyarebothpointingalmostduenorth( 1),and
clearlythetruemeandirectionisexactlyduenorth.However,thearithmeticmean
359
180 ,whichisduesouthandexactlytheoppositeofthe
2
givesus180
correctanswer.Thecorrectwaytocalculatethemeandirectionisdescribedbelow.
2) IfyouapplyaSineorCosinetransformation,makesuretoconvertthevaluesto
radiansfirst!Mostanalyticalsoftwareandprogramminglanguageshavesineand
cosinefunctions,butthesefunctionsusuallyassumethevaluesareinradians,not
degrees.Thereareexactly2(~6.28)radiansinacircle.Thismeansthatthe
softwarewillassumethatadifferenceof3.14(i.e.)unitsisequivalenttogoing
halfwayaroundthecircle.Ifyourdataareindegrees,thenthesoftwarewill
interpretachangein2toberoughlyequivalenttogoingathirdofthewayaround
thecircle.Fortunatelyitiseasytoconverttoradiansusingthefollowingformula:
DegreestoRadians:
Radians
180
180
20
Itispossiblethatyoursoftwarehasafunctionthatallowsyoutocalculatesinesand
cosinesfromdegrees(manycalculatorsdo),buteveninthiscaseyoumust
remembertosettheswitchcorrectly.
Fortunatelytherearewellestablishedmethodsavailableforanalyzingcircularorperiodic
datasuchasmovementdirectionoraspect.Thecircularnatureofthedataleadtovery
specificandinterestingapproachestocalculatingmeasuresofcentraltendencyand
dispersion(seep.43forhowtousethisextensiontocalculatecircularstatistics).Someof
thebasicdescriptivestatisticsare:
Mean Direction and Mean Resultant Length
Where: DirectioninRadians
n
C cos i
i 1
S sin i
1
tan S C
1
tan S C
MeanDirection: tan1 S C 2
R2 C2 S2
i 1
S 0, C 0
C0
S 0, C 0
S 0, C 0
S 0, C 0
ResultantLength: R R 2
R
MeanResultantLength: R
n
Theequationsformeandirectionlookalittleconfusing,butthelogicisactuallyvery
intuitive.Itissimplyaprocessofvectoraddition,whereeachdirectionvalueisasingle
vector.Vectoradditionessentiallyconnectsallthedirectionvectorsintoapath,andthe
meandirectionisjustthedirectiontothelastpointonthepath.
Forexample,considerascenariowith4directionvaluesat45,75,120and220:
Weconnectthe4bearingsinapath(vectoradditionjustaddsuptheXandY
componentsofeachvector,whichisthesameastreatingeachbearingasasegmentina
path).Itdoesnotmatterwhatorderweconnectthevectorsin;theywillalwaysendupat
thesamepoint.TheMeanDirectionisthebearingfromthestartofthepathtotheendof
thepath.
21
Onasidenote,thisisalsothewaytocalculatethemeandirectionofanactualobserved
movementpath.IfyouhaveaseriesoflocationsfromaGPScollaronanelk,forexample,
andyouwonderwhataveragedirectiontheanimalmovedovertheday,thenthataverage
directionissimplythedirectionfromthefirstGPSlocationofthedaytothelast.
TheMeanResultantLength R isthebasisforseveralvaluesofdispersion(analogousto
varianceorstandarddeviation),andiscalculatedasthestraightlinedistancefromthe
startingpointtotheendingpointofthepathdividedbythenumberofsegments(ifthe
segmentsareunitvectors,whereeachvectorhasalengthof1)orbythetotallengthofthe
pathifthesegmentshavevariablelengths.
Noticethatthemeanresultantlengthhasapotentialrangeof0to1.Ifallthevectors
pointedinexactlythesamedirection,theresultantlengthwouldthenbeequaltothetotal
pathlengthandthemeanresultantlengthwouldbeequalto1.Thisisthescenariowiththe
minimumpossiblevarianceordispersioninthevectors.Themorethepathwanders
around,theshorterboththeresultantlengthandthemeanresultantlengthwillbe.Ifthe
pathendedbackattheorigin,thenbothvalueswouldbeequalto0.
Variance and Standard Deviation:
MardiaandJupp(2000),Fisher(1995)andBatschelet(1981)describecircularstatistics
analogoustovarianceandstandarddeviations,basedonthemeanresultantlength R .
CircularVariance: V 1 R
(Mardia&Jupp,Fisher)
(Batschelet)
(Mardia&Jupp,Fisher)
2 ln R InRadians
s 2 1 R InRadians (Batschelet)
AngularVariance: s 2 1 R
2
CircularStandardDeviation: v
AngularDeviation: s
22
TheCircularStandardDeviationandAngularDeviationarebothinunitsofRadians,but
thesecaneasilybeconvertedtoDegrees.
RadianstoDegrees:
Degrees
180
Radians
Batcheletpointsoutthatcircularstandarddeviationandtheangulardeviationtendtobe
closetoeachotherformostvaluesof R. However,as R tendstoward0,circularstandard
deviationtendstoward whileangulardeviationtendstowardamaximumvalueof 2.
Batchelet,citingSeyfarthandBarth(1972),presentsageometricderivationofangular
deviationwhichalsoprovidesavisualsenseofwhattheconceptmeans.
GivenaunitcirclewithRadius=1,andwith:
PointAdefinedasonthecirclehorizontalfromtheOriginO
PointBdefinedasonthecircleverticalfromPointC
Thens(angulardeviation)isjustthelengthofthelineconnectingpointsAandB.The
angulardeviationcanthereforebecalculatedbyapplyingthePythagoreantheoremto
BCO and ABC:
FromthePythagoreanTheoremon BCO :
x 2 R 2 12
x2 1 R 2
FromthePythagoreanTheoremon ABC :
s2 1 R
x2
Substitutingforx 2 :
1 R
1 R 1 R 1 R
s2 1 R
1 2R R 2 1 R 2
2 2R
2 1 R
s 2 1 R
23
Probablytheeasiesttransformationistosimplygroupyourdirectionvaluesintogeneraland
intuitiveranges(forexample,N=31545,E=45135,S=135225,andW=225
315),creatingacategoricaldatasetwhichmaybeappropriateforsomeanalyses.
Deviations from a Bearing
Asimpleandbasictransformationistoconvertyourdirectionvaluesintodeviationsfroma
directionofinterest.Forexample,ifyoufeltthattheobjectofyourstudywaslikelytobe
affectedbythenorthvs.southfacingaspectphenomenon,thenyoumightdefineyour
directionvaluesintermsofDeviationfromNorthwhereeachvaluewouldreflectthe
distance,indegrees,fromdueNorth.Yourfullsetoftransformedvalueswouldrangefrom
0to180(seefigurebelow).Thisoptionhastheadvantageofmaintainingaconstantinterval
betweenunits,suchthatthedifferenceindirectionbetween0and1degreeisthesameas
thedifferencebetween90and91degrees.
Sine and Cosine Transformations
Aspectvaluesareoftenconvertedtosineandcosinevalues,essentiallydecomposingthem
intonorthsouthandeastwestcomponents.Remembertoconvertyourdirectionvaluesto
radiansbeforedoingthistransformation!Sinevaluesrangefrom1(atduewest)to1(at
24
dueeast),whilecosinevaluesrangefrom1(atduesouth)to1(atduenorth).Notethat
thismethoddoesnotmaintainaconstantintervalbetweenunits.Thesineandcosine
valueschangebyavariableamountdependingonthedirection,suchthatachangeinsine
correspondingtoachangeof1degree=0.00015whengoingfrom90to91degrees,but
increasesbymorethan2ordersofmagnitudeto0.017whengoingfrom180to181
degrees.Thisissuemaybeimportantinyourstatisticalanalysisifyourmethodassumes
thatyourdataareintervallevel.
TrimbleandWeitzman(1956)andBeersetal.(1966)suggestaninterestingalternative
combiningtwooftheapproachesabove,rescalingaspectvaluesbasedonanoptimum
bearing(135forTrimble&Weitzman,andageneralequationforanyaspectofinterestfor
Beersetal.)thentakingthesineoftherescaledvalues,thenadding1,whichtheyputto
extensiveuseinsiteproductivityresearchfortimberstands.Beersetal.sgeneralequation
is:
A TransformedAspectCode,inDegrees
sin A 90 AMax 1
cos AMax A 1
Where:
AMax Theaspectwhichistobeassignedthehighestnumericalvalueonthetransformscale
Note:Beersetal.sequationpresumesthatyoucancalculatethesineorcosineofavaluein
degrees.Manycalculatorscandothis,butmanyprogramminglanguagesrequireyour
valuestobeinradians.Ifyouneedtoconvertyourvalues,theDegreestoRadians
conversionformulaisonp.20ofthismanual.
25
Theatan2functionisamethodofcalculatingthearctangent tan1 usingtwovalues(X
andY),andithasapossiblerangerepresentingafullcircle(to+radians,or180to
+180).Thestandardarctangentfunctioncanonlyproducevaluesrangingfrom to ,
2
or90to+90.Thisatan2functionisthesameoneusedtocalculatemeandirectionabove,
andiscalculatedasfollows:
1 y
tan x
1 y
tan
x
1 y
atan2 y , x : tan
x
Undefined
y 0, x 0
y 0, x 0
y 0, x 0
y 0, x 0
y 0, x 0
y 0, x 0
i.e.nomovement
Mathematicaldirectionisdifferentthancompassdirection.Inthemathematicalpolar
coordinatesystem,0isequivalenttodueeastandpolardirectionsincreaseinacounter
clockwisedirection.Compassdirectionstartsatnorthandincreasesinaclockwisedirection.
Thereforewemustconvertthemathematicaldirectiontoacompassaspectaccordingtothe
followingrules:
ifMathematicalDirection>90thenAspect=(450Direction)
OtherwiseAspect=(90Direction)
ArcGISusesHornsmethod(Horn1981,BurroughandMcDonnell1998)tocalculatetheeast
west(G)andnorthsouth(H)gradientsfroma3x3arrayofelevationpoints.Thefigure
belowshowsthe8elevationvaluesthatareusedtocalculateaspectatthecentralcellXX
(notethattheformuladoesnotusetheelevationvalueatthecentralcell):
Z1 ---- Z2 ---- Z3
|
|
|
|
|
|
|
|
|
Z4 ---- XX ---- Z6
|
|
|
|
|
|
|
|
|
Z7 ---- Z8 ---- Z9
26
InHornsMethod,thenorthsouthgradientiscalculatedfromallthreecolumnsinthe3x3
array,withthecentralcolumnweightedtwiceashighasthetwooutercolumns.Theeast
westgradientiscalculatedinasimilarmanner.
Z3 2Z6 Z9 Z1 2Z4 Z7
EastWestGradient G
8 x
Z1 2Z2 Z3 Z7 2Z8 Z9
NorthSouthGradient H
8 y
Interestingly,Jones(1998)comparedseveralslopeandaspectalgorithmsonamathematical
surfaceinwhichthetrueexactslopeandaspectatanypointcouldbecalculated.Hefound
thatHornsmethoddidbetterthanmostmethods,butwasmarginallyworsethanamethod
calledthe4cellmethod.HethentestedallmethodsonatruelandscapeDEMandfound
thattherankingsamongmethodswereconsistent,soHornsmethodstillcamein2ndplace.
Anothertidbit:MichaelHodgson(1995)publishedapaperusingthesamemathematical
surfacethatJones(1998)did,inwhichhedemonstratesthatthearearepresentedby
computedslopeandaspectisactuallylargerthantherasterDEMcellsize.8cellalgorithms
(suchasHornsmethod)moreaccuratelyreflectvaluesforanareaapproximatelytwicethe
cellsize,while4cellalgorithms(suchasthe4Cellmethod)reflectanareaapproximately
1.6Xtheoriginalcellarea.
Insum,amethodcalledthe4cellmethodissimpler,slightlyquickertocalculate,more
preciseandmarginallymoreaccuratethanHornsmethod.
Forthosewhoareinterested,theauthoroffersafreeArcGISextensionthatwillcalculate
slopeandaspectusingavarietyofmethodsincludingbothHornsmethodandthe4cell
method(seehttp://www.jennessent.com/arcgis/surface_area.htm).Thisextensiondoes
notrequireSpatialAnalyst.
Inthiscase,wecannottreatthecellsizeasasingleconstantvalue.Themethodstocorrect
forlatitude/longitudedatagobeyondthescopeofthisarticlebutaredescribedinJenness
(2011;seeespeciallyp.4049ofthemanualat
http://www.jennessent.com/downloads/DEM%20Surface%20Tools%20for%20ArcGIS.pdf).
Forthosewhoareinterested,theauthorsfreeArcGISextensionDEMSurfaceToolswill
automaticallycorrectforlatitude/longitudedata(see
http://www.jennessent.com/arcgis/surface_area.htm).
Asofversion9.2ofArcGISandSpatialAnalyst,ESRIhasincludedatoolintheArcToolboxto
calculatesolarradiationforspecificpointsonthelandscape,orovertheentirelandscape.
28
Thisfunctionincorporatesbothdirectanddiffuseradiationandshadowsfromnearby
topography.Itincludesseveralusefuloptions,including:
1) Outputseithertheamountofenergyhittingtheground(inWattsperHour),orthe
totalnumberofhoursinwhichthegroundisexposedtothesun.
2) Canbecalculatedforspecificdates,seasonsoryears.
3) Hasoptionalparameterswhereyoucanspecifythegeneralatmosphericconditions
inyourareaofinterest.
4) Hasoptionalparameterswhereyoucanspecifyhowintensivelyitexaminesthelocal
topographybeforedeterminingtheamountofradiationhittinganarea.
Ingeneral,thisisawonderfulandexcitingnewtool.Ihavenoticedtwominordrawbacksto
thetool:
1) Itisslowonlargegrids,andonoccasionIhaveneededtoletitrunforhoursordays.
2) Idonotbelievethatitincorporatesreflectivityoffthelandscape.Thiswouldbe
hardtomodel,ofcourse,andwoulddependonexactlyhowreflectiveyour
landscapeis(snowreflectsverydifferentlyfromlavarocks,forexample).
Despitethesetwominordrawbacks,Iexpectthatthistoolwillbecomeveryvaluablefor
habitatanalysis.
29
Hillshade
ForthosewhodonothaveaccesstotheSolarAnalyst,youcanusethehillshadefunction
availableinmanyGISpackagesgetareasonableestimatefortherelativeamountofsunlight
thathitsthelandscapeatasinglepointintime.Valueswilltypicallyrangefrom0(meaning
nosunlighthitsthelandscape)to255(meaningtheangleofthelandscapeisfacingthesun
directly).HillshadesaredifficulttocalculateifyourDEMisingeographiccoordinates,but
theauthoroffersafreeArcGIStooltodothis(see
http://www.jennessent.com/arcgis/surface_area.htm)whichdoesnotrequireSpatial
Analyst.
30
toopentheFeaturestoSegmentsdialog:
31
Selectthelayertoconvert,anyattributefieldsyouwanttotransfertoyournewfeature
class,whethertodoallorselectedrecords,anyadditionalattributesdescribingthe
geometryofeachsegment,andwheretosaveyournewfeatureclass.ClickOKandthe
toolwillcreatethesegmentfeatureclassandaddittoyourArcMapdocument.
Thetoolwillalsogenerateareportdescribingwhatitdid.
32
33
ThetoolwillgeneratetheplotasagraphicintheMXDLayoutandthereforeyoumusthave
thelayoutactivewhenyougeneratetheplot.IfyoutrytogeneratetheplotwhiletheMap
viewisactive,thetoolwilloffertoswitchyoutothelayoutviewautomatically.
Thegraphiccanbecopiedandpastedtoothersoftwarepackages(MicrosoftWordand
PowerPoint,forexample).However,forbestresultsIrecommendexportingthegraphicinto
astandardimagefileusingthestandardArcGISExportfunctions.
ThegraphicwillactuallybeaGroupedgraphicwhereeachcomponentisaseparate
graphic.Ifyoucreateyourgraphicplotandwanttomodifyanysingleportionofit,simply:
1) SelecttheplotgraphicusingtheArcGISSelectElementstool
2) RightclickonthegraphicandchooseUngroup
3) SelecttheindividualelementyouwanttoeditusingtheSelectElementstool
4) RightclickonitandchooseProperties.
Note:TheBearingsplottypeisonlyintendedforcaseswithlessthanafewhundred
bearings.Thisgraphictakesalongtimetodrawandcanbemiserabletoworkwithifyou
havemorethanafewhundredbearings.
34
ClickthePolarPlotsbutton
toopenthePolarPlotParametersdialog:
Therearealotofoptionsonthisdialog,sotheyarebrokendownintosubsetsandare
accessedbyclickingthesubsetbutton.Forexample,theShowDataSourcebuttonopens
upthedatasourceoptionsandletsyoupickthedatasettoplot,plusspecifythesourcefor
azimuthandweightvalues.
Plot Style
ThePlotStylesectionisalwaysvisibleandshowsthesixplotstyleoptionsavailable.To
seealargerexampleofanyoftheplotstyles,clicktheShowExamplebutton.Thislarger
examplealsohasmostoftheplot,title,referencelineandlabeloptionspointedout:
ClicktheShowDataSourcebuttontoopentheDataSourceoptions:
35
DataSource:Thelistincludesallfeatureclassesandtablesinyourcurrentfocusmap.
Note:Thisversionofthetooldoesnotworkwithrasterdatasets.Ifyouwishtoplot
thedistributionofarasterdataset(ofaspectvalues,forexample),therearetwo
approachesyoumighttry:
1) Converttherastertoapointfeatureclass,thenselectthepointsthatliewithinyour
areaofinterest,andthenrunthistoolontheselectedpoints.
2) ConverttherastertoanIntegertyperaster(whichhasanassociatedattributetable
containingValueandCountfields),thenexporttheattributetabletoa
standalonetable,andthenrunthetoolontheattributetable.UsetheValuefield
asthesourceofazimuthvalues,andtheCountfieldasthesourceofweight
values.
AzimuthSource:IfyourdatasourceisaTable,PointFeatureClassorPolygonFeature
Class,thenyoumustsetyoursourceofazimuthvaluestoanattributefieldinthe
attributetable.IfyourdatasourceisaPolylineFeatureClass,thenyoumayderiveyour
azimuthvaluesdirectionfromthepolylinefeatures.Inthiscase,azimuthisdefinedas
theazimuthfromthestartingpointtotheendingpointofthepolyline.Ifthepolylineis
inlatitude/longitudecoordinates,thenthistoolusesthestartingazimuthvalue(see
AzimuthsandGeodesicCurvesonp.16foranexplanationofstartingvs.ending
azimuthvalues).
WeightSource:Ifyourdirectionvalueshavedifferentweights(forexample,ifyourdata
sourceisapolylinefeatureclassofsegmentsandeachsegmentmightbeadifferent
length),thenyoumaychoosetoweightyourdirectionvaluesbysomeattributevalue.If
yourdatasourceisapolylinefeatureclass,thenyoualsohavetheoptiontoweighteach
polylinebythelengthofthatpolyline.
36
AnalyzeAllvs.SelectedRecords:Ifanyofyourrecordsareselected,thenyouhavethe
optiontoonlyanalyzethatselectedset.
AddReverseAzimuths:Ifyourdatasetrepresentsaphenomenainwhichboth
directionsshouldbeplotted(suchasgeologicfracturelinesonthelandscape),thenthis
optionwillplotboththeobservedazimuthvalueforeachrecordplustheazimuthinthe
reversedirection.Inaplotwithreversedazimuths,everybinvaluewillbereflectedbya
binoftheexactsamelengthgoingintheoppositedirection.
ExcludeNegativeValues:Dependingonyourdata,negativevaluesmayreflectgenuine
directions(counterclockwisefromnorth)ortheymaybeaflagthatthevalueisan
invalidazimuth.Forexample,aspectgeneratingalgorithmsoftenproducea1valueif
therastercellisflat(i.e.ifithasnoaspect).Thisoptionletsyouexcludeanynegative
valuesfromtheanalysis.
Theseoptionsallowyoutosetthesymbolizationfortheplot,plusoptionallyaddand
symbolizeprimaryandsecondarytitles.
ClicktheShowPlotandTitleOptionsbuttontoshowtheplotcolorandtitleoptions:
37
Differentplotstyleswillhavedifferentoptionsavailable.Forexample,boththeExternal
PeaksandValleysandtheExternalCircularBinsrequireInsideCircleDiameterand
OutsidePlotDiametervalues,whileallotherplottypesonlyrequireasingleplotdiameter
value.
NumberofBins:Thisisthenumberofbinsaroundthecircle.Avalueof72meansthat
eachbinwillcover5.Avalueof180meansthateachbinwillcover2.
BinOutlineandInternalColors:Theinternalplotofbinshasbothaninternalcolorand
anoutlinecolor.Eithercolorcanbesettotransparent.
BinOutlineWidth:Inpoints.Ifyoudonotwishtoseetheoutline,youmayeitherset
thisvalueto0orsettheoutlinecolortransparent.
BearingLineColor(onlyforBearingsplot):Thisisthecolorofthebearinglinesinthe
plot.
BearingLineWidth(onlyforBearingsplot):Thewidthofthebearinglinesintheplot,
inpoints.Thisvaluemustbe0.2.
LowandHighDensityColors(onlyforShadebyDensityplot):Thebinwiththelowest
totalvaluewillbecoloredtheLowDensityColorvalueandthebinwiththehighest
38
valuewillbecoloredtheHighDensityColor.Intermediatebinswillbecolored
accordingtoacolorrampfromthelowtohighcolor.
PlotDiameter(onlyforPeaksandValleys,CircularBins,BearingsandShadeby
Densityplots):Thisisthediameterofthecircle,ininches,thatcontainsallthedata.It
doesnotincludeanylabelsoutsidethiscircle.
InsideCircleDiameter(onlyforExternalPeaksandValleysandExternalCircularBins
plots):Thisisthediameteroftheinnercircle,ininches,whichformsthebaseoftheplot
bins.
OutsidePlotDiameter(onlyforExternalPeaksandValleysandExternalCircularBins
plots):Thisisthediameterofthecircle,ininches,thatcontainsallthedata.Itdoesnot
includeanytitlesoutsidethiscircle.
PrimaryTitle:Checkthisoptionandspecifyatitleifyouwishtoaddatitletoyour
graphic.Youmayalsospecifythefontstyle,sizeandcolor.
SecondaryTitles:Allsecondarytitleswillusethesamefontstyle,sizeandcolor.You
havetheoptiontoaddanyorallof4secondarytitles:
o
DataSource,includingboththedatasetandthesourceofazimuthvalues.
Countofvaluesanalyzed.Thismaybeeitherthetotalnumberofrecordsorthe
numberofselectedrecordsdependingonyourchoice.Ifyouchosetoaddreverse
azimuthvalues,thenthecountwillbedoubled.Ifyouchosetoexcludenegative
values,thenthecountwillonlyincludetheazimuths0.
TotalWeight/Length:Ifyouweightedyourazimuthvalues,thenthisoptionwill
showtheweightingsourceandthetotalcumulativeweight.Ifyoudidnotweight
yourazimuthvalues,thenthisoptionwilladdthelineValuesNotWeightedto
yourplot.
39
MaximumBinValue(thisappliestoallplottypesexceptforShadebyBearing
plots):Thisisthemaximumbinvalue.Ifyouweightedyourazimuthvalues,then
thiswillbethelargestcumulativeweightinabin.Otherwisethiswillbethe
maximumnumberofazimuthvaluesinabin.
Theseoptionsallowyoutooptionallyadd,symbolizeandlabelreferencelines.
ClicktheShowReferenceLineandLabelOptionsbuttontoshowthevariousoptions:
40
ReferencelinesaredividedintoPrimaryandSecondaryreferencelines.Thesetwotypescan
bysymbolizeddifferently.Forexample,youmaywanttosetyourprimaryreferencelinesin
adarkercolorandwithathickerlinethanyoursecondaryreferencelines.Primaryreference
lineswillalwaysbedrawnasasolidline,butsecondaryreferencelinesmayoptionallybe
drawnassolidlines,dots,dashesormixeddotsanddashes.
Bothprimaryandsecondaryreferencelinesaredrawnforbothazimuthsandvalues.
Azimuthreferencelinesextendoutfromthecenterasrays,whileValuereferencelinesare
drawnasprogressivelylargercircles.
PrimaryAzimuthreferencelinesareonlydrawnattheNorth,East,SouthandWest
directions.
ThePrimaryAzimuthOuterCircleisdrawnatthemaximumbinvalue.
ThePrimaryAzimuthInnerCircleisonlyavailableintheExternalPeaksandValleysand
theExternalCircularBinsplottypes,andisdrawnatthebaseofthebins.
Anynumber3SecondaryReferenceLineBearingsmaybeadded.Avalueof12means
thatsecondaryreferencelineswillbedrawnevery30.Avalueof15willproduce
referencelinesevery24,andavalueof18willproducelinesevery20.
41
Anynumber1SecondaryReferenceCirclesmaybeadded.Thisoptionappliestoall
plottypesexceptforShadebyBearingplots.Thisisthenumberofcirclesbetweenthe
0levelandthemaximumbinlevel.Avalueof1willputasinglecirclehalfwaybetween
0andthemaximumbinlevel.
AzimuthLabelsarethenumericDegreevaluesaroundtheoutsideofthePeaksand
Valleys,CircularBins,BearingsandShadebyDensityplottypes,oraroundtheinsideof
theExternalPeaksandValleysandExternalCircularBinsplottypes.Theseazimuth
labelswillbedrawnatallprimaryandsecondaryreferenceazimuths.
InnerLabelsshowthebinvalueatallofthesecondaryreferencecirclelevels.These
innerlabelsmaybedrawnonanyoralloftheNorth,East,SouthandWestaxes.This
optionappliestoallplottypesexceptforShadebyBearingplots.Ifnosecondary
referencecirclesaredrawn,thentheInnerLabeloptionswillbedisabled.Note:There
isnooptiontoaddthebinvalueatthemaximumcirclelevel.However,thereisan
optiontoaddthismaximumbinvaluetothetitle.
42
toopenthePolarPlotParametersdialog:
ClicktheShowDataSourcebuttontoopentheDataSourceoptionssection:
Selectthedatasettoanalyze,theazimuthsourceandoptionallyaweightingsource,and
thenclicktheCalculateStatisticsbuttonatthebottomofthedialog.Thetoolwillgiveyou
thestatisticsinaseparatewindow:
43
44
Revisions
Version1.0.225(July6,2012):
InitialRelease
Version1.0.237(September12,2012):
FixedanerrorinwhichitwouldnotworkwithnonPolylinefeatureclasses,insteadgivingyoua
messagestatingthatthespecifiedfeatureclasswasnotapolylinefeatureclass.
AlsoupdatedtheCalculateStatisticsfunctionsoitwouldtellyouhowmanyfeaturesorrowsit
analyzed.
Version1.0.250(September20,2013):
AddedVonMisesKappameasureofconcentrationtostatistics.
Modifiedanalysiscount(inplotandinstatisticsreport)toshowcorrectnumberifanyrecordswere
excludedfromtheanalysis(negativevalues,nullfeatures,missingazimuthorweightvalues,etc.).
Afewcosmeticchanges.
FixedanerrorthatproducedthemessageInvalidprocedurecallorargumentatline1328of
frmLayerID.frmwhentheAddReverseAzimuthsbuttonwasclickedwhennodatasourceswere
availableinthemap.
Version1.0.253(June23,2014):
ModifiedFeaturestoSegmentstooltoclearupamysteriousbugthatcausedArcGISto
shutdowncompletelyinsomecases.Alsomodifiedtooltorunfasteringeneral,and
especiallywithtwovertexpolylines.
45
References
Batschelet,Edward.1981.Circularstatisticsinbiology.London;NewYork:AcademicPress.
Beers,ThomasW.,PeterE.Dress,andLeeC.Wensel.1966.NotesandObservations:Aspect
TransformationinSiteProductivityResearch.JournalofForestry64(10):691692.
Burrough,PeterA,andRachaelAMcDonnell.1998.Principlesofgeographicalinformationsystems.
Oxford:OxfordUniversityPress.
Fisher,N.I.1995.Statisticalanalysisofcirculardata.Cambridge[England];NewYork:Cambridge
UniversityPress.
Hodgson,M.1995.WhatCellSizeDoestheComputedSlope/aspectAngleRepresent?Vol.61.
PhotogrammetricEngineeringandRemoteSensing.Bethesda,MD,ETATSUNIS:American
SocietyforPhotogrammetryandRemoteSensing.
Horn,B.K.P.1981.HillShadingandtheReflectanceMap.ProceedingsoftheIEEE69(1):1447.
doi:10.1109/PROC.1981.11918.
Jammalamadaka,S.Rao,andASenGupta.2001.Topicsincircularstatistics.RiverEdge,N.J.:World
Scientific.http://site.ebrary.com/id/10255767.
Jenness,Jeff.2011.DEMSurfaceTools:AnArcGISExtensionforAnalyzingRasterElevationDatasets.
JennessEnterprises.http://www.jennessent.com/arcgis/surface_area.htm.
Jones,KevinH.1998.AComparisonofAlgorithmsUsedtoComputeHillSlopeasaPropertyofthe
DEM.Computers&Geosciences24(4)(May15):315323.doi:10.1016/S0098
3004(98)000326.
Mardia,K.V,andP.EJupp.2000.Directionalstatistics.NewYork:Wiley.
Seyfarth,ErnstAugust,andFriedrichG.Barth.1972.CompoundSlitSenseOrgansontheSpiderLeg:
MechanoreceptorsInvolvedinKinestheticOrientation.JournalofComparativePhysiology
A:Neuroethology,Sensory,Neural,andBehavioralPhysiology78(2)(June1):176191.
doi:10.1007/BF00693611.
Trimble,G.R.,andSidneyWeitzman.1956.SiteIndexStudiesofUplandOaksintheNorthern
Appalachians.ForestScience2(3):162173.
Zar,JerroldH.1999.BiostatisticalAnalysis.4thed.PearsonEducation.
.
46