<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Floow accumulation with relative elevation in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/floow-accumulation-with-relative-elevation/m-p/395518#M5579</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here a sniipit of some Python code that builds "accumulated" elevation, slope, curvature, etc. grids - these grids are used as part of a DEM-based stream perdiction model.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note: flowDirLclGrd = a flow direction grid derived from a filled DEM.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;flowAcc1Grd = root + "\\" + areaFolderName + "\\" + origOidFolderName + "\\flowacc1"
gp.FlowAccumulation_sa(flowDirLclGrd, flowAcc1Grd, "", "FLOAT"); showGpMessage()

#Process: Builds a flow accumulation grid - accumulated acreage
flowAcc2Grd = root + "\\" + areaFolderName + "\\" + origOidFolderName + "\\flowacc2"
somaExp = "FlowAccumulation(" + flowDirLclGrd + ") * " + str(int(gp.cellsize) * int(gp.cellsize)) + " / 43560"
gp.SingleOutputMapAlgebra_sa(somaExp, flowAcc2Grd); showGpMessage()

#Process: Builds a flow accumulation grid - of estimated CFS using only watershed area and precip
pcpGrd = root + "\\" + areaFolderName + "\\" + origOidFolderName + "\\pcp"
gp.Resample_management(precipGrd, pcpGrd, gp.cellsize, "BILINEAR"); showGpMessage()
flowAcc3Grd = root + "\\" + areaFolderName + "\\" + origOidFolderName + "\\flowacc3"
somaExp = "flowaccumulation(" + flowDirLclGrd + ", " + pcpGrd + ", 'FLOAT') * " + str(int(gp.cellsize) * int(gp.cellsize)) + ") / 12 ) / 31556926" #31556926 = seconds/year
gp.SingleOutputMapAlgebra_sa(somaExp, flowAcc3Grd); showGpMessage()

#Process: Reclassifies any 0s flowAcc1Grd to 1 (which makes it so that we can use division (aka can't divide a grid by another grid if the denominator has a 0 in it)
flowAcc5Grd = root + "\\" + areaFolderName + "\\" + origOidFolderName + "\\flowacc5"
somaExp = "con(" + flowAcc1Grd + " == 0, 1, " + flowAcc1Grd + ")"
gp.SingleOutputMapAlgebra_sa(somaExp, flowAcc5Grd); showGpMessage()

#Process: Builds an accumulated elevation grid (uses the fil2LclGrd)
accElvGrd = root + "\\" + areaFolderName + "\\" + origOidFolderName + "\\acc_elev"
somaExp = "flowaccumulation(" + flowDirLclGrd + ", " + fil2LclGrd + ", 'FLOAT') / " + flowAcc5Grd
gp.SingleOutputMapAlgebra_sa(somaExp, accElvGrd); showGpMessage()&amp;nbsp;&amp;nbsp; 

#Process: Builds an accumulated slope grid
accSlpGrd = root + "\\" + areaFolderName + "\\" + origOidFolderName + "\\acc_slp"
somaExp = "flowaccumulation(" + flowDirLclGrd + ", " + slpGrd + ", 'FLOAT') / " + flowAcc5Grd
gp.SingleOutputMapAlgebra_sa(somaExp, accSlpGrd); showGpMessage()

#Process: Builds an accumulated curvature grid - fancy stuff is to deal with negative values
accCurGrd = root + "\\" + areaFolderName + "\\" + origOidFolderName + "\\acc_cur"
somaExp = "(flowaccumulation(" + flowDirLclGrd + ", max(" + curGrd + ", 0), 'FLOAT') - flowaccumulation(" + flowDirLclGrd + ", max(-1 * " + curGrd + ", 0), 'FLOAT')) / " + flowAcc5Grd 
gp.SingleOutputMapAlgebra_sa(somaExp, accCurGrd); showGpMessage()

#Process: Builds an accumulated profile grid
accProGrd = root + "\\" + areaFolderName + "\\" + origOidFolderName + "\\acc_pro"
somaExp = "(flowaccumulation(" + flowDirLclGrd + ", max(" + proGrd + ", 0), 'FLOAT') - flowaccumulation(" + flowDirLclGrd + ", max(-1 * " + proGrd + ", 0), 'FLOAT')) / " + flowAcc5Grd 
gp.SingleOutputMapAlgebra_sa(somaExp, accProGrd); showGpMessage()

#Process: Builds an accumulated plan grid
accPlnGrd = root + "\\" + areaFolderName + "\\" + origOidFolderName + "\\acc_pln"
somaExp = "(flowaccumulation(" + flowDirLclGrd + ", max(" + plnGrd + ", 0), 'FLOAT') - flowaccumulation(" + flowDirLclGrd + ", max(-1 * " + plnGrd + ", 0), 'FLOAT')) / " + flowAcc5Grd&amp;nbsp; 
gp.SingleOutputMapAlgebra_sa(somaExp, accPlnGrd); showGpMessage() &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 18:06:40 GMT</pubDate>
    <dc:creator>ChrisSnyder</dc:creator>
    <dc:date>2021-12-11T18:06:40Z</dc:date>
    <item>
      <title>Floow accumulation with relative elevation</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/floow-accumulation-with-relative-elevation/m-p/395516#M5577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm new to arcGIS, and in this project i'm working on, i need to resort to a specific hydric erosion model that is based on the cumulative relative elevation of the flow. What i need to know is if its possible to apply the cumulative relative elevation of the upstream cells on the flow accumulation tool, or if there's any script that can help me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also need to apply the same principle but with cumulative slope angles (in degrees).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Jul 2011 15:53:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/floow-accumulation-with-relative-elevation/m-p/395516#M5577</guid>
      <dc:creator>RicardoBarbas</dc:creator>
      <dc:date>2011-07-17T15:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Floow accumulation with relative elevation</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/floow-accumulation-with-relative-elevation/m-p/395517#M5578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You need Spatial Analyst. Here is a good starting point. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/An_overview_of_the_Hydrology_tools/009z0000004w000000/"&gt;An overview of the Hydrology toolset&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Pavan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 00:36:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/floow-accumulation-with-relative-elevation/m-p/395517#M5578</guid>
      <dc:creator>PavanYadav</dc:creator>
      <dc:date>2011-07-19T00:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Floow accumulation with relative elevation</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/floow-accumulation-with-relative-elevation/m-p/395518#M5579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here a sniipit of some Python code that builds "accumulated" elevation, slope, curvature, etc. grids - these grids are used as part of a DEM-based stream perdiction model.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note: flowDirLclGrd = a flow direction grid derived from a filled DEM.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;flowAcc1Grd = root + "\\" + areaFolderName + "\\" + origOidFolderName + "\\flowacc1"
gp.FlowAccumulation_sa(flowDirLclGrd, flowAcc1Grd, "", "FLOAT"); showGpMessage()

#Process: Builds a flow accumulation grid - accumulated acreage
flowAcc2Grd = root + "\\" + areaFolderName + "\\" + origOidFolderName + "\\flowacc2"
somaExp = "FlowAccumulation(" + flowDirLclGrd + ") * " + str(int(gp.cellsize) * int(gp.cellsize)) + " / 43560"
gp.SingleOutputMapAlgebra_sa(somaExp, flowAcc2Grd); showGpMessage()

#Process: Builds a flow accumulation grid - of estimated CFS using only watershed area and precip
pcpGrd = root + "\\" + areaFolderName + "\\" + origOidFolderName + "\\pcp"
gp.Resample_management(precipGrd, pcpGrd, gp.cellsize, "BILINEAR"); showGpMessage()
flowAcc3Grd = root + "\\" + areaFolderName + "\\" + origOidFolderName + "\\flowacc3"
somaExp = "flowaccumulation(" + flowDirLclGrd + ", " + pcpGrd + ", 'FLOAT') * " + str(int(gp.cellsize) * int(gp.cellsize)) + ") / 12 ) / 31556926" #31556926 = seconds/year
gp.SingleOutputMapAlgebra_sa(somaExp, flowAcc3Grd); showGpMessage()

#Process: Reclassifies any 0s flowAcc1Grd to 1 (which makes it so that we can use division (aka can't divide a grid by another grid if the denominator has a 0 in it)
flowAcc5Grd = root + "\\" + areaFolderName + "\\" + origOidFolderName + "\\flowacc5"
somaExp = "con(" + flowAcc1Grd + " == 0, 1, " + flowAcc1Grd + ")"
gp.SingleOutputMapAlgebra_sa(somaExp, flowAcc5Grd); showGpMessage()

#Process: Builds an accumulated elevation grid (uses the fil2LclGrd)
accElvGrd = root + "\\" + areaFolderName + "\\" + origOidFolderName + "\\acc_elev"
somaExp = "flowaccumulation(" + flowDirLclGrd + ", " + fil2LclGrd + ", 'FLOAT') / " + flowAcc5Grd
gp.SingleOutputMapAlgebra_sa(somaExp, accElvGrd); showGpMessage()&amp;nbsp;&amp;nbsp; 

#Process: Builds an accumulated slope grid
accSlpGrd = root + "\\" + areaFolderName + "\\" + origOidFolderName + "\\acc_slp"
somaExp = "flowaccumulation(" + flowDirLclGrd + ", " + slpGrd + ", 'FLOAT') / " + flowAcc5Grd
gp.SingleOutputMapAlgebra_sa(somaExp, accSlpGrd); showGpMessage()

#Process: Builds an accumulated curvature grid - fancy stuff is to deal with negative values
accCurGrd = root + "\\" + areaFolderName + "\\" + origOidFolderName + "\\acc_cur"
somaExp = "(flowaccumulation(" + flowDirLclGrd + ", max(" + curGrd + ", 0), 'FLOAT') - flowaccumulation(" + flowDirLclGrd + ", max(-1 * " + curGrd + ", 0), 'FLOAT')) / " + flowAcc5Grd 
gp.SingleOutputMapAlgebra_sa(somaExp, accCurGrd); showGpMessage()

#Process: Builds an accumulated profile grid
accProGrd = root + "\\" + areaFolderName + "\\" + origOidFolderName + "\\acc_pro"
somaExp = "(flowaccumulation(" + flowDirLclGrd + ", max(" + proGrd + ", 0), 'FLOAT') - flowaccumulation(" + flowDirLclGrd + ", max(-1 * " + proGrd + ", 0), 'FLOAT')) / " + flowAcc5Grd 
gp.SingleOutputMapAlgebra_sa(somaExp, accProGrd); showGpMessage()

#Process: Builds an accumulated plan grid
accPlnGrd = root + "\\" + areaFolderName + "\\" + origOidFolderName + "\\acc_pln"
somaExp = "(flowaccumulation(" + flowDirLclGrd + ", max(" + plnGrd + ", 0), 'FLOAT') - flowaccumulation(" + flowDirLclGrd + ", max(-1 * " + plnGrd + ", 0), 'FLOAT')) / " + flowAcc5Grd&amp;nbsp; 
gp.SingleOutputMapAlgebra_sa(somaExp, accPlnGrd); showGpMessage() &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:06:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/floow-accumulation-with-relative-elevation/m-p/395518#M5579</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2021-12-11T18:06:40Z</dc:date>
    </item>
  </channel>
</rss>

