% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/featured_space_raster.R
\name{maxent_raster_sample_indices}
\alias{maxent_raster_sample_indices}
\title{Convert occurrence coordinates to 0-based stream indices}
\usage{
maxent_raster_sample_indices(rast, cells)
}
\arguments{
\item{rast}{A \code{terra::SpatRaster}.}

\item{cells}{Integer vector of 1-based cell indices
(as returned by \code{terra::cellFromXY}).}
}
\value{
Integer vector of 0-based indices within the finite-cell stream.
  Occurrence cells that fall on NA raster values (and therefore never
  appear in the stream) are silently dropped and a warning is emitted.
}
\description{
Maps occurrence cell indices (as produced by \code{terra::cellFromXY})
into 0-based indices within the concatenated stream of finite
(non-NA) background cells emitted by
\code{\link{maxent_featured_space_from_rast}}.
}
