GME

Geospatial Modelling Environment

raster.profile (Extract Raster Profile Data)

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

Description

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.

Syntax

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

Example

raster.profile(in="C:\data\dem", row=1385, out="C:\data\rprofile.r");

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


Messages

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

Tips on how to use this interface efficiently  Read more...

Links

Open Source GIS

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