Академический Документы
Профессиональный Документы
Культура Документы
NAME:PolarPlotsandCircularStatistics
InstallFile:PolarPlots.exe
Lastmodified:June23,2014
TOPICS:Polarplot,Roseplot,CircularStatistics,Angular
Deviation,AngularVariance,MeanResultantLength,Circular
StandardDeviation,CircularVariance
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. ThePolarPlotstoolcreatesagraphicintheMXDlayoutillustratingthedistributionof
directionvaluesinafeatureclass(suchasthosegeneratedintheShapestoSegments
tool)ortable.ThePolarPlotstoolalsohasanoptiontocalculatebasiccircular
descriptivestatisticsondata.
Output:Onetoolproducespolylinefeatureclassesandtheothertoolproducesagraphicplot
intheMXDLayout.
Requires:ArcGIS9.1orbetter,atanylicenselevel.
RevisionHistoryonp.47.
RecommendedCitationFormat:Forthosewhowishtocitethisextension,theauthor
recommendssomethingsimilarto:
Jenness,J.2014.PolarPlotsandCircularStatistics:ExtensionforArcGIS.JennessEnterprises.
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............................................................................................................................13
If Any of the Tools Crash ................................................................................................................................................ 13
Object variable or With block variable not set Error: .................................................................................................... 13
RICHTX32.OCX Error (also comct332.ocx, comdlg32.ocx, mscomct2.ocx, mscomctl.ocx, msstdfmt.dll errors): ......... 13
ISSUESWITHDIRECTIONALDATA..........................................................................................................17
Azimuths and Geodesic Curves ..................................................................................................................................... 17
Graphically Representing Directional Data .................................................................................................................... 18
Analyzing Directional Data: Circular Statistics ............................................................................................................... 21
MeanDirectionandMeanResultantLength........................................................................................................22
VarianceandStandardDeviation:........................................................................................................................24
Other Methods to Analyze Directional Data ................................................................................................................... 25
ClassificationofDirectionalValues.......................................................................................................................26
DeviationsfromaBearing....................................................................................................................................26
SineandCosineTransformations.........................................................................................................................26
SPECIALCONSIDERATIONSFORASPECT..................................................................................................27
How Aspect is Calculated............................................................................................................................................... 27
Isthisthebestmethodtocalculateaspect?.........................................................................................................29
Issues with Aspect .......................................................................................................................................................... 29
Solar Insolation: An alternative to Aspect...................................................................................................................... 30
ESRIsSolarRadiationTool...................................................................................................................................31
Hillshade...............................................................................................................................................................32
USINGTHETOOLS..............................................................................................................................33
Convert Shapes to Segments ........................................................................................................................................ 33
Generate Circular Plots .................................................................................................................................................. 36
PlotStyle...............................................................................................................................................................37
DataSourceOptions:............................................................................................................................................38
PlotandTitleOptions:..........................................................................................................................................39
ReferenceLineandLabelOptions:.......................................................................................................................42
Calculate Descriptive Circular Statistics ......................................................................................................................... 45
REVISIONS........................................................................................................................................47
REFERENCES......................................................................................................................................48
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.exetocreateregistrationand
unregistrationbatchfilesthatareproperlyformattedtoyoursystem.
a. DoubleclickthenewbatchfileRegister_Polar_Plots_Tool.battoregisterthe
toolwithArcGIS10.0.
b. Iftheregistrationissuccessful,thenyoushouldseeaRegistrationSucceeded
notice.
5. ForWindowsVistaorWindows7:RightclickthefileMake_Batch_Files.exe,andthen
chooseRunasAdministratortocreateregistrationandunregistrationbatchfilesthatare
properlyformattedtoyoursystem.
6. RightclickthenewbatchfileRegister_Polar_Plots_Tool.bat,andthenchooseRunas
AdministratortoregisterallthetoolswithArcGIS10.0.
7. Iftheregistrationissuccessful,thenyoushouldseeaRegistrationSucceedednotice.
Note:Fortheconcernedorcurious,thebatchfileRegister_Polar_Plots_Tool.batcontainsa
singlelineoftextthatlookssimilartothefollowing:
"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(alsolocatedin
yourinstallationdirectory).BothRegister_Polar_Plots_Tool.batandPolarPlots.regmaybe
openedandviewedusingstandardtexteditorssuchasNotepadorWordPad.
Todothis,openyourCustomizetoolbyeither:
1) DoubleclickingonablankpartoftheArcMaptoolbar,or
2) ForArcGIS9,clicktheToolsmenu,thenCustomize,or
3) ForArcGIS10,clicktheCustomizemenu,thenCustomizeMode
IntheCustomizedialog,clicktheCommandstabandscrolldowntoselectJenness
Enterprises:
Finally,simplydragtheConvertShapestoSegmentsand/orthePolarPlotcommandsoutofthe
CustomizedialogupintoanyoftheexistingArcGIStoolbars.
UninstallingthePolarPlotsandCircularStatisticsExtension
For ArcGIS 9.x.
1) CloseArcGISifitisopen.
2)ClicktheStartbutton.
3) OpenyourControlPanel.
4) DoubleclickAddorRemovePrograms.
5) ScrolldowntofindandselectPolarPlotsandCircularStatistics.
6) ClicktheRemovebuttonandfollowthedirections.
10
3) FindthefileUnregister_Polar_Plots_Tool.bat.IFYOUDONOTSEETHISFILE,usethe
Make_Batch_Files.exetooltocreatethebatchfile.RefertoStep4inInstallingthe
PolarPlotsandCircularStatisticsExtensionaboveforinstructionsonhowtousethis
tool.
4) ForWindowsXP:DoubleclickthefileUnregister_Polar_Plots_Tool.battounregister
thetoolwithArcGIS10.0.
ForWindowsVistaandWindows7:RightclickthefileUnregister_Polar_Plots_Tool.bat
andselectRunasAdministratortounregisterthetoolwithArcGIS10.0.
Iftheunregistrationissuccessful,thenyoushouldseeanUnregistrationSucceeded
notice.
5) ClicktheStartbutton.
6) OpenyourControlPanel.
7) DoubleclickAddorRemovePrograms.
8) ScrolldowntofindandselectPolarPlotsandCircularStatistics10.
9) ClicktheUninstallbuttonandfollowthedirections.
11
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.batmaybeopenedandviewedusingstandardtexteditorssuchas
NotepadorWordPad.
12
Troubleshooting
If Any of the Tools Crash
Ifatoolcrashes,youshouldseeadialogthattellsuswhatscriptcrashedandwhereitcrashed.I
wouldappreciateitifyoucouldcopythetextinthatdialog,orsimplytakescreenshotsofthe
dialogandemailthemtomeatjeffj@jennessent.com.Note:Pleasemakesurethattheline
numbersarevisibleinthescreenshots!Thelinenumbersarelocatedonthefarrightsideofthe
text.Usethescrollbaratthebottomofthedialogtomakethelinenumbersvisible.
Orifyouseeasimilarerrorstatingthatoneormoreofthefilescomct332.ocx,comdlg32.ocx,
mscomct2.ocx,mscomctl.ocxormsstdfmt.dllaremissingorinvalid,thensimplyfollowthe
instructionsforRICHTX32.OCXbelow,butsubstitutetheappropriatefileforRICHTX32.OCX.
ThiserrorisalmostalwaysduetothefactthatnewinstallationsofWindows7andWindows
Vistadonotincludeafilethattheextensionexpectstofind.Forexample,thefilerichtx32.ocx
isactuallytheRichTextBoxcontrolthatappearsonsomeoftheextensiondialogs.Theother
OCXfilesrefertoothercommoncontrolsthatmightappearonthevariousextensiondialogs.
Thesolutionistomanuallyinstallthemissingfile(richtx32.ocx)yourself.Hereishowtodoit:
1) OpenWindowsExplorerandlocatethefilerichtx32.ocxinyourextensioninstallation
file.
2) Ifyouarerunninga32bitversionofWindows,thencopyrichtx32.ocxtothedirectory
C:\Windows\System32\
Ifyouarerunninga64bitversionofWindows,thencopyrichtx32.ocxtothedirectory
C:\Windows\SysWOW64\
3) OpenanElevatedCommandPromptwindow.ThisisthestandardWindows
CommandPromptwindow,butwithadministrativeprivilegesenabled.Youneedthese
13
privilegesenabledinordertoregistertheOCXwithWindows.Note:TheElevated
CommandPromptopensupinthe..\windows\system32directory,notthe
..\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
14
http://www.winhelponline.com/articles/158/1/HowtoopenanelevatedCommand
PromptinWindowsVista.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.
15
16
17
ThelinefromNewYorkstartsatabearingof34,continuesinastraightlinetheentireway,but
arrivesinMoscowonabearingof130.
Formovementsegmentslessthanafewhundredmiles,andsufficientlyfarawayfromthe
poles,thedifferencebetweenstartingandendingazimuthstendstobenegligible.Forlong
distancesandforanalysisnearthepoles,however,weshouldbeawareofthisphenomenon
andbecarefulabouthowwedefineourdirectionalvalues.
18
Nightingalesplotsshowedvariationbyseason,butthismethodalsoworksverywellfor
displayingdirectionaldata.Forexample,givenasetoftrailsintheSanFranciscoBayarea,we
canusearoseplottoillustratethegeneralNorthwest/Southeastorientationofthosetrails:
CommonvariationsonthetraditionalroseplotincludesymbolizingthehistogrambinsasPeaks
andValleys,andputtingthebinsontheoutsideofthecircleratherthantheinside.
19
Whenonlyafewdirectionvaluesneedtobedisplayed,youcansimplyshowthebearingsina
circularplot.
Anotherinterestingmethodisapiecharttypeimagewheretheslicesareshadedaccordingto
theproportionofthedatathatfacesthatparticulardirection:
20
Althoughthislastmethodislesseffectiveatshowingtheshapeofthedistributionasother
methods,itisstillaninterestingstyleofillustrationbecauseitissovisuallyintuitive.Inthe
imageabove,itiseasytoseethattheobservedroostlocationspredominatelyfacetowardthe
southeast.
Thisextensionprovidesmethodstocreatealltheplottypesillustratedabove(seep.36fora
descriptionofthetool).AdditionalsoftwaretoolscanbefoundwithaGooglesearch.Fisher
(1995:1530)alsodiscussesalternativemethodsforgraphingcirculardata.
135 .Butwhatisthemeandirectionof359
2
isequaltothearithmeticmean
and1?Theyarebothpointingalmostduenorth( 1),andclearlythetruemean
directionisexactlyduenorth.However,thearithmeticmeangivesus180
359
180 ,whichisduesouthandexactlytheoppositeofthecorrectanswer.The
correctwaytocalculatethemeandirectionisdescribedbelow.
2) IfyouapplyaSineorCosinetransformation,makesuretoconvertthevaluesto
radiansfirst!Mostanalyticalsoftwareandprogramminglanguageshavesineand
cosinefunctions,butthesefunctionsusuallyassumethevaluesareinradians,not
degrees.Thereareexactly2(~6.28)radiansinacircle.Thismeansthatthesoftware
willassumethatadifferenceof3.14(i.e.)unitsisequivalenttogoinghalfwayaround
thecircle.Ifyourdataareindegrees,thenthesoftwarewillinterpretachangein2to
21
beroughlyequivalenttogoingathirdofthewayaroundthecircle.Fortunatelyitis
easytoconverttoradiansusingthefollowingformula:
Degrees Degrees 3.14159265358979
180
180
Itispossiblethatyoursoftwarehasafunctionthatallowsyoutocalculatesinesand
cosinesfromdegrees(manycalculatorsdo),buteveninthiscaseyoumustremember
tosettheswitchcorrectly.
DegreestoRadians:
Radians
Fortunatelytherearewellestablishedmethodsavailableforanalyzingcircularorperiodicdata
suchasmovementdirectionoraspect.Thecircularnatureofthedataleadtoveryspecificand
interestingapproachestocalculatingmeasuresofcentraltendencyanddispersion(seep.45for
howtousethisextensiontocalculatecircularstatistics).Someofthebasicdescriptivestatistics
are:
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,butthelogicisactuallyveryintuitive.It
issimplyaprocessofvectoraddition,whereeachdirectionvalueisasinglevector.Vector
additionessentiallyconnectsallthedirectionvectorsintoapath,andthemeandirectionisjust
thedirectionfromtheorigintothelastpointonthepath.
Forexample,considerascenariowith4directionvaluesat45,75,120and220:
22
Weconnectthe4bearingsinapath(vectoradditionjustaddsuptheXandYcomponentsof
eachvector,whichisthesameastreatingeachbearingasasegmentinapath).Itdoesnot
matterwhatorderweconnectthevectorsin;theywillalwaysendupatthesamepoint.The
MeanDirectionisthebearingfromthestartofthepathtotheendofthepath.
Onasidenote,thisisalsothewaytocalculatethemeandirectionofanactualobserved
movementpath.IfyouhaveaseriesoflocationsfromaGPScollaronanelk,forexample,and
youwonderwhataveragedirectiontheanimalmovedovertheday,thenthataveragedirection
issimplythedirectionfromthefirstGPSlocationofthedaytothelast.
TheMeanResultantLength R isthebasisforseveralvaluesofdispersion(analogousto
varianceorstandarddeviation),andiscalculatedasthestraightlinedistancefromthestarting
pointtotheendingpointofthepathdividedbythetotallengthofthepath.Ifthesegmentsare
unitvectors(e.g.aspectvaluesfromanaspectraster,whereeachaspectvaluehasthesame
weightasanyother),thenthiscanbesimplifiedtodividingbythenumberofsegmentsor
observations.
Noticethatthemeanresultantlengthhasapotentialrangeof0to1.Ifallthevectorspointed
inexactlythesamedirection,theresultantlengthwouldthenbeequaltothetotalpathlength
andthemeanresultantlengthwouldbeequalto1.Thisisthescenariowiththeminimum
possiblevarianceordispersioninthevectors.Themorethepathwandersaround,theshorter
boththeresultantlengthandthemeanresultantlengthwillbe.Ifthepathendedbackatthe
origin,thenbothvalueswouldbeequalto0.
23
MardiaandJupp(2000),Fisher(1995)andBatschelet(1981)describecircularstatistics
analogoustovarianceandstandarddeviations,allbasedonthemeanresultantlength 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
TheCircularStandardDeviationandAngularDeviationarebothinunitsofRadians,butthese
caneasilybeconvertedtoDegrees.
RadianstoDegrees:
Degrees
180
Radians
Batcheletpointsoutthatcircularstandarddeviationandtheangulardeviationtendtobeclose
toeachotherforhighvaluesof R (i.e.near1).However,as R tendstoward0,circular
standarddeviationtendstoward whileangulardeviationtendstowardamaximumvalueof
2. Batchelet,citingSeyfarthandBarth(1972),presentsageometricderivationofangular
deviationwhichalsoprovidesavisualsenseofwhattheconceptmeans.
GivenaunitcirclewithRadius=1,andwith:
PointAdefinedasonthecirclehorizontalfromtheOriginO
PointBdefinedasonthecircleverticalfromPointC
Thens(angulardeviation)isjustthelengthofthelineconnectingpointsAandB(alsoknownas
theChordof AOB ).Theangulardeviationcanthereforebecalculatedbyapplyingthe
Pythagoreantheoremto BCO and ABC:
24
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
25
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.Yourfullsetoftransformedvalueswouldrangefrom0to
180(seefigurebelow).Thisoptionhastheadvantageofmaintainingaconstantinterval
betweenunits,suchthatthedifferenceindirectionbetween0and1degreeisthesameasthe
differencebetween90and91degrees.
Sine and Cosine Transformations
Aspectvaluesareoftenconvertedtosineandcosinevalues,essentiallydecomposingtheminto
northsouthandeastwestcomponents.Remembertoconvertyourdirectionvaluestoradians
beforedoingthistransformation!Sinevaluesrangefrom1(atduewest)to1(atdueeast),
whilecosinevaluesrangefrom1(atduesouth)to1(atduenorth).Notethatthismethoddoes
notmaintainaconstantintervalbetweenunits.Thesineandcosinevalueschangebyavariable
amountdependingonthedirection,suchthatachangeinsinecorrespondingtoachangeof1
degree=0.00015whengoingfrom90to91degrees,butincreasesbymorethan2ordersof
magnitudeto0.017whengoingfrom180to181degrees.Thisissuemaybeimportantinyour
statisticalanalysisifyourmethodassumesthatyourdataareintervallevel.
26
TrimbleandWeitzman(1956)andBeersetal.(1966)suggestaninterestingalternative
combiningtwooftheapproachesabove,rescalingaspectvaluesbasedonanoptimumbearing
(135forTrimble&Weitzman,andageneralequationforanyaspectofinterestforBeersetal.)
thentakingthesineoftherescaledvalues,thenadding1,whichtheyputtoextensiveuseinsite
productivityresearchfortimberstands.Beersetal.sgeneralequationis:
A TransformedAspectCode,inDegrees
sin A 90 AMax 1
cos AMax A 1
Where:
AMax Theaspectwhichistobeassignedthehighestnumericalvalueonthetransformscale
Note:Beersetal.sequationpresumesthatyoucancalculatethesineorcosineofavaluein
degrees.Manycalculatorscandothis,butmanyprogramminglanguagesrequireyourvaluesto
beinradians.Ifyouneedtoconvertyourvalues,theDegreestoRadiansconversionformulais
onp.22ofthismanual.
elevationpoints,butingeneralaspectisdefinedasthedirectionofmaximumslope.Giventhat
G=easttowestgradientandH=northtosouthgradient,thenaspectiscalculatedasfollows:
180
MathematicalDirection(indegrees) atan 2 H , G
Thestandardarctangentfunctioncanonlyproducevaluesrangingfrom to ,or90to
2
+90.Thisatan2functionisthesameoneusedtocalculatemeandirectionabove,andis
calculatedasfollows:
1 y
tan x
1 y
tan
x
y
atan2 y , x : tan1
x
2
2
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.
Thereforewemustconvertthemathematicaldirectiontoacompassdirectionaccordingtothe
followingrules:
ifMathematicalDirection>90thenCompassDirection=(450MathematicalDirection)
OtherwiseCompassDirection=(90MathematicalDirection)
ArcGISusesHornsmethod(Horn1981,BurroughandMcDonnell1998)tocalculatetheeast
west(G)andnorthsouth(H)gradientsfroma3x3arrayofelevationpoints.Thefigurebelow
showsthe8elevationvaluesthatareusedtocalculateaspectatthecentralcellXX(notethat
theformuladoesnotusetheelevationvalueatthecentralcell):
Z1 ---- Z2 ---- Z3
|
|
|
|
|
|
|
|
|
Z4 ---- XX ---- Z6
|
|
|
|
|
|
|
|
|
Z7 ---- Z8 ---- Z9
InHornsMethod,thenorthsouthgradientiscalculatedfromallthreecolumnsinthe3x3array,
withthecentralcolumnweightedtwiceashighasthetwooutercolumns.Theeastwest
gradientiscalculatedinasimilarmanner.
28
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.Hefoundthat
Hornsmethoddidbetterthanmostmethods,butwasmarginallyworsethanamethodcalled
the4cellmethod.HethentestedallmethodsonatruelandscapeDEMandfoundthatthe
rankingsamongmethodswereconsistent,soHornsmethodstillcamein2ndplace.
Anothertidbit:MichaelHodgson(1995)publishedapaperusingthesamemathematical
surfacethatJones(1998)did,inwhichhedemonstratesthatthearearepresentedbycomputed
slopeandaspectisactuallylargerthantherasterDEMcellsize.8cellalgorithms(suchasHorns
method)moreaccuratelydescribeslopeandaspectforanareaapproximatelytwicethecell
size,while4cellalgorithms(suchasthe4Cellmethod)describeanareaapproximately1.6X
thecellsize.
Insum,amethodcalledthe4cellmethodissimpler,slightlyquickertocalculate,moreprecise
andmarginallymoreaccuratethanHornsmethod.However,thetimeandaccuracylostusing
Hornsmethodisprobablyveryminorinmostcases.
Forthosewhoareinterested,theauthoroffersafreeArcGISextensionthatwillcalculateslope
andaspectusingavarietyofmethodsincludingbothHornsmethodandthe4cellmethod(see
http://www.jennessent.com/arcgis/surface_area.htm).ThisextensiondoesnotrequireSpatial
Analyst.
Rastercellsthataresquareinunprojectedspaceactuallyformtrapezoidswhenviewedonthe
actualsurfaceoftheplanet.
Inthiscase,wecannottreatthecellsizeasasingleconstantvalue.Themethodstocorrectfor
latitude/longitudedatagobeyondthescopeofthisarticlebutaredescribedinJenness(2011;
seeespeciallyp.4049ofthemanual).Forthosewhoareinterested,theauthorsfreeArcGIS
extensionDEMSurfaceToolswillautomaticallycorrectforlatitude/longitudedata(see
http://www.jennessent.com/arcgis/surface_area.htm).
30
Asofversion9.2ofArcGISandSpatialAnalyst,ESRIhasincludedatoolintheArcToolboxto
calculatesolarradiationforspecificpointsonthelandscape,orovertheentirelandscape.
Thisfunctionincorporatesbothdirectanddiffuseradiationandshadowsfromnearby
topography.Itincludesseveralusefuloptions,including:
1) Outputseithertheamountofenergyhittingtheground(inWattsperHour),orthetotal
numberofhoursinwhichthegroundisexposedtothesun.
2) Canbecalculatedforspecificdates,seasonsoryears.
3) Hasoptionalparameterswhereyoucanspecifythegeneralatmosphericconditionsin
yourareaofinterest.
4) Hasoptionalparameterswhereyoucanspecifyhowintensivelyitexaminesthelocal
topographybeforedeterminingtheamountofradiationhittinganarea.
Ingeneral,thisisawonderfulandexcitingnewtool.Ihavenoticedtwominordrawbackstothe
tool:
1) Itisslowonlargegrids,andonoccasionIhaveneededtoletitrunforhoursordays.
31
2) Idonotbelievethatitincorporatesreflectivityoffthelandscape.Thiswouldbehardto
model,ofcourse,andwoulddependonexactlyhowreflectiveyourlandscapeis(snow
reflectsverydifferentlyfromlavarocks,forexample).
Despitethesetwominordrawbacks,Iexpectthatthistoolwillbecomeveryvaluableforhabitat
analysis.
Hillshade
ForthosewhodonothaveaccesstotheSolarAnalyst,youcanusethehillshadefunction
availableinmanyGISpackagesgetareasonableestimatefortherelativeamountofsunlight
thathitsthelandscapeatasinglepointintime.Valueswilltypicallyrangefrom0(meaningno
sunlighthitsthelandscape)to255(meaningtheangleofthelandscapeisfacingthesun
directly).HillshadesaredifficulttocalculateifyourDEMisingeographiccoordinates,butthe
authoroffersafreeArcGIStooltodothis(see
http://www.jennessent.com/arcgis/surface_area.htm)whichdoesnotrequireSpatialAnalyst.
32
toopentheFeaturestoSegmentsdialog:
33
Selectthelayertoconvert,anyattributefieldsyouwanttotransfertoyournewfeatureclass,
whethertodoallorselectedrecords,anyadditionalattributesdescribingthegeometryofeach
segment,andwheretosaveyournewfeatureclass.ClickOKandthetoolwillcreatethe
segmentfeatureclassandaddittoyourArcMapdocument.
Thetoolwillalsogenerateareportdescribingwhatitdid.
34
35
ThetoolwillgeneratetheplotasagraphicintheMXDLayoutandthereforeyoumusthavethe
layoutactivewhenyougeneratetheplot.IfyoutrytogeneratetheplotwhiletheMapviewis
active,thetoolwilloffertoswitchyoutothelayoutviewautomatically.
Thegraphiccanbecopiedandpastedtoothersoftwarepackages(MicrosoftWordand
PowerPoint,forexample).However,forbestresultsIrecommendexportingthegraphicintoa
standardimagefileusingthestandardArcGISExportfunctions.
ThegraphicwillactuallybeaGroupedgraphicwhereeachcomponentisaseparategraphic.If
youcreateyourgraphicplotandwanttomodifyanysingleportionofit,simply:
1) SelecttheplotgraphicusingtheArcGISSelectElementstool
2) RightclickonthegraphicandchooseUngroup
3) SelecttheindividualelementyouwanttoeditusingtheSelectElementstool
4) RightclickonitandchooseProperties.
36
Note:TheBearingsplottypeisonlyintendedforcaseswithlessthanafewhundredbearings.
Thisgraphictakesalongtimetodrawandcanbemiserabletoworkwithifyouhavemorethan
afewhundredbearings.
ClickthePolarPlotsbutton
toopenthePolarPlotParametersdialog:
Therearealotofoptionsonthisdialog,sotheyarebrokendownintosubsetsandareaccessed
byclickingthesubsetbutton.Forexample,theShowDataSourcebuttonopensupthedata
sourceoptionsandletsyoupickthedatasettoplot,plusspecifythesourceforazimuthand
weightvalues.
Plot Style
ThePlotStylesectionisalwaysvisibleandshowsthesixplotstyleoptionsavailable.Toseea
largerexampleofanyoftheplotstyles,clicktheShowExamplebutton.Thislargerexample
alsohasmostoftheplot,title,referencelineandlabeloptionspointedout:
37
ClicktheShowDataSourcebuttontoopentheDataSourceoptions:
DataSource:Thelistincludesallfeatureclassesandtablesinyourcurrentfocusmap.
Note:Thisversionofthetooldoesnotworkwithrasterdatasets.Ifyouwishtoplotthe
distributionofarasterdataset(ofaspectvalues,forexample),therearetwoapproaches
youmighttry:
1) Converttherastertoapointfeatureclass,thenselectthepointsthatliewithinyour
areaofinterest,andthenrunthistoolontheselectedpoints.
2) ConverttherastertoanIntegertyperaster(whichhasanassociatedattributetable
containingValueandCountfields),thenexporttheattributetabletoastandalone
table,andthenrunthetoolontheattributetable.UsetheValuefieldasthesource
ofazimuthvalues,andtheCountfieldasthesourceofweightvalues.
AzimuthSource:IfyourdatasourceisaTable,PointFeatureClassorPolygonFeatureClass,
thenyoumustsetyoursourceofazimuthvaluestoanattributefieldintheattributetable.
IfyourdatasourceisaPolylineFeatureClass,thenyoumayderiveyourazimuthvalues
directionfromthepolylinefeatures.Inthiscase,azimuthisdefinedastheazimuthfromthe
startingpointtotheendingpointofthepolyline.Ifthepolylineisinlatitude/longitude
coordinates,thenthistoolusesthestartingazimuthvalue(seeAzimuthsandGeodesic
Curvesonp.17foranexplanationofstartingvs.endingazimuthvalues).
38
WeightSource:Ifyourdirectionvalueshavedifferentweights(forexample,ifyourdata
sourceisapolylinefeatureclassofsegmentsandeachsegmentmightbeadifferentlength),
thenyoumaychoosetoweightyourdirectionvaluesbysomeattributevalue.Ifyourdata
sourceisapolylinefeatureclass,thenyoualsohavetheoptiontoweighteachpolylineby
thelengthofthatpolyline.
AnalyzeAllvs.SelectedRecords:Ifanyofyourrecordsareselected,thenyouhavethe
optiontoonlyanalyzethatselectedset.
AddReverseAzimuths:Ifyourdatasetrepresentsaphenomenainwhichbothdirections
shouldbeplotted(suchasgeologicfracturelinesonthelandscape),thenthisoptionwill
plotboththeobservedazimuthvalueforeachrecordplustheazimuthinthereverse
direction.Inaplotwithreversedazimuths,everybinvaluewillbereflectedbyabinofthe
exactsamelengthgoingintheoppositedirection.
ExcludeNegativeValues:Dependingonyourdata,negativevaluesmayreflectgenuine
directions(counterclockwisefromnorth)ortheymaybeaflagthatthevalueisaninvalid
azimuth.Forexample,aspectgeneratingalgorithmsoftenproducea1valueiftheraster
cellisflat(i.e.ifithasnoaspect).Thisoptionletsyouexcludeanynegativevaluesfromthe
analysis.
Theseoptionsallowyoutosetthesymbolizationfortheplot,plusoptionallyaddandsymbolize
primaryandsecondarytitles.
ClicktheShowPlotandTitleOptionsbuttontoshowtheplotcolorandtitleoptions:
39
Differentplotstyleswillhavedifferentoptionsavailable.Forexample,boththeExternalPeaks
andValleysandtheExternalCircularBinsrequireInsideCircleDiameterandOutsidePlot
Diametervalues,whileallotherplottypesonlyrequireasingleplotdiametervalue.
NumberofBins:Thisisthenumberofbinsaroundthecircle.Avalueof72meansthat
eachbinwillcover5.Avalueof180meansthateachbinwillcover2.
BinOutlineandInternalColors:Theinternalplotofbinshasbothaninternalcolorandan
outlinecolor.Eithercolorcanbesettotransparent.
BinOutlineWidth:Inpoints.Ifyoudonotwishtoseetheoutline,youmayeithersetthis
valueto0orsettheoutlinecolortransparent.
BearingLineColor(onlyforBearingsplot):Thisisthecolorofthebearinglinesintheplot.
BearingLineWidth(onlyforBearingsplot):Thewidthofthebearinglinesintheplot,in
points.Thisvaluemustbe0.2.
40
LowandHighDensityColors(onlyforShadebyDensityplot):Thebinwiththelowest
totalvaluewillbecoloredtheLowDensityColorvalueandthebinwiththehighestvalue
willbecoloredtheHighDensityColor.Intermediatebinswillbecoloredaccordingtoa
colorrampfromthelowtohighcolor.
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:Checkthisoptionandspecifyatitleifyouwishtoaddatitletoyourgraphic.
Youmayalsospecifythefontstyle,sizeandcolor.
SecondaryTitles:Allsecondarytitleswillusethesamefontstyle,sizeandcolor.Youhave
theoptiontoaddanyorallof4secondarytitles:
o
DataSource,includingboththedatasetandthesourceofazimuthvalues.
Countofvaluesanalyzed.Thismaybeeitherthetotalnumberofrecordsorthenumber
ofselectedrecordsdependingonyourchoice.Ifyouchosetoaddreverseazimuth
41
values,thenthecountwillbedoubled.Ifyouchosetoexcludenegativevalues,then
thecountwillonlyincludetheazimuths0.
o
TotalWeight/Length:Ifyouweightedyourazimuthvalues,thenthisoptionwillshow
theweightingsourceandthetotalcumulativeweight.Ifyoudidnotweightyour
azimuthvalues,thenthisoptionwilladdthelineValuesNotWeightedtoyourplot.
MaximumBinValue(thisappliestoallplottypesexceptforShadebyBearingplots):
Thisisthemaximumbinvalue.Ifyouweightedyourazimuthvalues,thenthiswillbe
thelargestcumulativeweightinabin.Otherwisethiswillbethemaximumnumberof
azimuthvaluesinabin.
Theseoptionsallowyoutooptionallyadd,symbolizeandlabelreferencelines.
ClicktheShowReferenceLineandLabelOptionsbuttontoshowthevariousoptions:
42
ReferencelinesaredividedintoPrimaryandSecondaryreferencelines.Thesetwotypescanby
symbolizeddifferently.Forexample,youmaywanttosetyourprimaryreferencelinesina
darkercolorandwithathickerlinethanyoursecondaryreferencelines.Primaryreferencelines
willalwaysbedrawnasasolidline,butsecondaryreferencelinesmayoptionallybedrawnas
solidlines,dots,dashesormixeddotsanddashes.
Bothprimaryandsecondaryreferencelinesaredrawnforbothazimuthsandvalues.Azimuth
referencelinesextendoutfromthecenterasrays,whileValuereferencelinesaredrawnas
progressivelylargercircles.
PrimaryAzimuthreferencelinesareonlydrawnattheNorth,East,SouthandWest
directions.
ThePrimaryAzimuthOuterCircleisdrawnatthemaximumbinvalue.
ThePrimaryAzimuthInnerCircleisonlyavailableintheExternalPeaksandValleysandthe
ExternalCircularBinsplottypes,andisdrawnatthebaseofthebins.
43
Anynumber3SecondaryReferenceLineBearingsmaybeadded.Avalueof12means
thatsecondaryreferencelineswillbedrawnevery30.Avalueof15willproducereference
linesevery24,andavalueof18willproducelinesevery20.
Anynumber1SecondaryReferenceCirclesmaybeadded.Thisoptionappliestoallplot
typesexceptforShadebyBearingplots.Thisisthenumberofcirclesbetweenthe0level
andthemaximumbinlevel.Avalueof1willputasinglecirclehalfwaybetween0andthe
maximumbinlevel.
AzimuthLabelsarethenumericDegreevaluesaroundtheoutsideofthePeaksandValleys,
CircularBins,BearingsandShadebyDensityplottypes,oraroundtheinsideoftheExternal
PeaksandValleysandExternalCircularBinsplottypes.Theseazimuthlabelswillbedrawn
atallprimaryandsecondaryreferenceazimuths.
InnerLabelsshowthebinvalueatallofthesecondaryreferencecirclelevels.Theseinner
labelsmaybedrawnonanyoralloftheNorth,East,SouthandWestaxes.Thisoption
appliestoallplottypesexceptforShadebyBearingplots.Ifnosecondaryreference
circlesaredrawn,thentheInnerLabeloptionswillbedisabled.Note:Thereisnooptionto
addthebinvalueatthemaximumcirclelevel.However,thereisanoptiontoaddthis
maximumbinvaluetothetitle.
44
toopenthePolarPlotParametersdialog:
ClicktheShowDataSourcebuttontoopentheDataSourceoptionssection:
45
Selectthedatasettoanalyze,theazimuthsourceandoptionallyaweightingsource,andthen
clicktheCalculateStatisticsbuttonatthebottomofthedialog.Thetoolwillgiveyouthe
statisticsinaseparatewindow:
46
Revisions
Version1.0.225(July6,2012):
InitialRelease
Version1.0.237(September12,2012):
FixedanerrorinwhichitwouldnotworkwithnonPolylinefeatureclasses,insteadgivingyouamessage
statingthatthespecifiedfeatureclasswasnotapolylinefeatureclass.
AlsoupdatedtheCalculateStatisticsfunctionsoitwouldtellyouhowmanyfeaturesorrowsitanalyzed.
Version1.0.250(September20,2013):
AddedVonMisesKappameasureofconcentrationtostatistics.
Modifiedanalysiscount(inplotandinstatisticsreport)toshowcorrectnumberifanyrecordswere
excludedfromtheanalysis(negativevalues,nullfeatures,missingazimuthorweightvalues,etc.).
Afewcosmeticchanges.
FixedanerrorthatproducedthemessageInvalidprocedurecallorargumentatline1328of
frmLayerID.frmwhentheAddReverseAzimuthsbuttonwasclickedwhennodatasourceswereavailable
inthemap.
Version1.0.253(June23,2014):
ModifiedFeaturestoSegmentstooltoclearupamysteriousbugthatcausedArcGIStoshut
downcompletelyinsomecases.Alsomodifiedtooltorunfasteringeneral,andespeciallywith
twovertexpolylines.
47
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.AComparisonofAlgorithmsUsedtoComputeHillSlopeasaPropertyoftheDEM.
Computers&Geosciences24(4)(May15):315323.doi:10.1016/S00983004(98)000326.
Mardia,K.V,andP.EJupp.2000.Directionalstatistics.NewYork:Wiley.
Seyfarth,ErnstAugust,andFriedrichG.Barth.1972.CompoundSlitSenseOrgansontheSpiderLeg:
MechanoreceptorsInvolvedinKinestheticOrientation.JournalofComparativePhysiologyA:
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.
.
48