Geospatial Modelling Environment

raster.profile (Extract Raster Profile Data)

Extract profile data for a row or column (all bands) in the raster


This tool extracts profile data from a raster along a row or column that you specify, creates a graph of the profile, and optionally writes it out as an R object that you can easily read into R using the load() function. It will extract profile data from all bands in the raster. The structure of the R data object created is a matrix in which the first two columns are the x and y coordinates of each cell in the row or column, and then a series of columns (equal to the number of bands) that contain the raster cell value data.


raster.profile(in, [row], [col], [out]);

inthe input raster data source
[row]the row number to extract (range 1:row count)
[col]the column number to extract (range 1:column count)
[out]the R object to create that contains the raster profile data


raster.profile(in=”C:datadem”, row=1385, out=”C:datarprofile.r”);

In R: load(file=”C:/data/rprofile.r”)


Please consider making a purchase to support the continued development of these tools  Read more...

Tips on how to use this interface efficiently 


Open Source GIS

Copyright © 2001-2014 Hawthorne L. Beyer, Ph.D., Spatial Ecology LLC    Connect on LinkedIn