% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/slopes.R
\name{slope_raster}
\alias{slope_raster}
\title{Calculate slopes using raster elevation data}
\usage{
slope_raster(
  routes,
  dem,
  lonlat = sf::st_is_longlat(routes),
  method = "bilinear",
  fun = slope_matrix_weighted,
  terra = NULL,
  directed = FALSE
)
}
\arguments{
\item{routes}{An sf object containing linestring geometries}

\item{dem}{A SpatRaster object (terra package) containing elevation data}

\item{lonlat}{Logical, whether coordinates are longitude/latitude (default: auto-detected)}

\item{method}{Method for raster extraction (default: "bilinear")}

\item{fun}{Function for slope calculation (default: slope_matrix_weighted)}

\item{terra}{Deprecated. Ignored; terra is always used.}

\item{directed}{Logical, whether to calculate directed slopes (default: FALSE)}
}
\value{
Numeric vector of slope values
}
\description{
Calculates slope gradients for routes using digital elevation model (DEM) raster data.
}
