<?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 Using R to obtain slope raster from DEM GRID raster in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/using-r-to-obtain-slope-raster-from-dem-grid/m-p/1134176#M6139</link>
    <description>&lt;P&gt;After some extensive googling, I wasn't able to find my answer (first time I couldn't surmount the issue by looking at others questions/answers)&lt;A href="https://www.calvindudearabic.com/" target="_self"&gt;.&lt;/A&gt; I am new to asking questions, so forgive any missteps.&lt;/P&gt;&lt;P&gt;I am attempting to perform what ArcGIS or QGIS performs with the slope tool, just within R. To do so I have been importing a raster that I exported from ArcGIS in GRID format with the following characteristics:&lt;/P&gt;&lt;PRE&gt;class      : RasterLayer 
dimensions : 821, 581, 477001  (nrow, ncol, ncell)
resolution : 4.996121, 4.996121  (x, y)
extent     : 2832147, 2835049, 14234048, 14238150  (xmin, xmax, ymin, ymax)
crs        : +proj=tmerc +lat_0=34.75 +lon_0=-118.583333333333 +k=0.9999 +x_0=800000.000000001 +y_0=3999999.99999999 +datum=NAD83 +units=us-ft +no_defs 
source     : rr_2020_shell 
names      : rr_2020_shell 
values     : 5623.253, 6401.356  (min, max)&lt;/PRE&gt;&lt;P&gt;It is already projected in the correct coordinate system (EPSG: 3423) but when I go to find the slope using the following code:&lt;/P&gt;&lt;PRE&gt;RR_2020_Slope = terrain(RR_2020_St1_Raster,'slope', units = 'degrees', neighbors = 8, filename = 'RR_2020_Slope.grd', overwrite = T)&lt;/PRE&gt;&lt;P&gt;The result is a slope raster that ranges from 0 to 1.28°, which is very different from what I have calculated in ArcGIS using the slope tool. Using the same DEM raster in the same projection in ArcGIS I used the slope tool with an input of 'Degree' for the output measurement, 'Planar' for the method, and 1 for Z factor and my resulting slope raster ranges from 0.001 to 73.396°.&lt;/P&gt;&lt;P&gt;Overall I am wondering where my mistake in R originates from, is it an elevation resolution problem? Are there issues with my projection? Forgive me, I can't necessarily include the data as they are sensitive materials but perhaps there is a clear and obvious mistake in my approach or assumptions about the functions I have used?&lt;/P&gt;</description>
    <pubDate>Sat, 15 Jan 2022 08:30:19 GMT</pubDate>
    <dc:creator>NoorMaria</dc:creator>
    <dc:date>2022-01-15T08:30:19Z</dc:date>
    <item>
      <title>Using R to obtain slope raster from DEM GRID raster</title>
      <link>https://community.esri.com/t5/developers-questions/using-r-to-obtain-slope-raster-from-dem-grid/m-p/1134176#M6139</link>
      <description>&lt;P&gt;After some extensive googling, I wasn't able to find my answer (first time I couldn't surmount the issue by looking at others questions/answers)&lt;A href="https://www.calvindudearabic.com/" target="_self"&gt;.&lt;/A&gt; I am new to asking questions, so forgive any missteps.&lt;/P&gt;&lt;P&gt;I am attempting to perform what ArcGIS or QGIS performs with the slope tool, just within R. To do so I have been importing a raster that I exported from ArcGIS in GRID format with the following characteristics:&lt;/P&gt;&lt;PRE&gt;class      : RasterLayer 
dimensions : 821, 581, 477001  (nrow, ncol, ncell)
resolution : 4.996121, 4.996121  (x, y)
extent     : 2832147, 2835049, 14234048, 14238150  (xmin, xmax, ymin, ymax)
crs        : +proj=tmerc +lat_0=34.75 +lon_0=-118.583333333333 +k=0.9999 +x_0=800000.000000001 +y_0=3999999.99999999 +datum=NAD83 +units=us-ft +no_defs 
source     : rr_2020_shell 
names      : rr_2020_shell 
values     : 5623.253, 6401.356  (min, max)&lt;/PRE&gt;&lt;P&gt;It is already projected in the correct coordinate system (EPSG: 3423) but when I go to find the slope using the following code:&lt;/P&gt;&lt;PRE&gt;RR_2020_Slope = terrain(RR_2020_St1_Raster,'slope', units = 'degrees', neighbors = 8, filename = 'RR_2020_Slope.grd', overwrite = T)&lt;/PRE&gt;&lt;P&gt;The result is a slope raster that ranges from 0 to 1.28°, which is very different from what I have calculated in ArcGIS using the slope tool. Using the same DEM raster in the same projection in ArcGIS I used the slope tool with an input of 'Degree' for the output measurement, 'Planar' for the method, and 1 for Z factor and my resulting slope raster ranges from 0.001 to 73.396°.&lt;/P&gt;&lt;P&gt;Overall I am wondering where my mistake in R originates from, is it an elevation resolution problem? Are there issues with my projection? Forgive me, I can't necessarily include the data as they are sensitive materials but perhaps there is a clear and obvious mistake in my approach or assumptions about the functions I have used?&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jan 2022 08:30:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/using-r-to-obtain-slope-raster-from-dem-grid/m-p/1134176#M6139</guid>
      <dc:creator>NoorMaria</dc:creator>
      <dc:date>2022-01-15T08:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using R to obtain slope raster from DEM GRID raster</title>
      <link>https://community.esri.com/t5/developers-questions/using-r-to-obtain-slope-raster-from-dem-grid/m-p/1134697#M6140</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;observers can help you.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 18:09:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/using-r-to-obtain-slope-raster-from-dem-grid/m-p/1134697#M6140</guid>
      <dc:creator>ManiaMulti</dc:creator>
      <dc:date>2022-01-18T18:09:28Z</dc:date>
    </item>
  </channel>
</rss>

