Geospatial Modelling Environment

isectlinerst (Intersect Lines With Raster)

Creates a statistical or frequency summary of raster data along a line (polyline) based on a raster layer


This tool creates a summary for a line (polyline) based on a raster layer. The output consists of summary fields that are added to the line attribute table. It processes thematic (i.e. categorical) and continuous rasters in different ways. For thematic rasters, a new field is added for each unique value in the raster and is populated with the length of each line passing though raster cells of that type. The tool also records the cell values for the start and end of the line. For continuous rasters the summary includes the length weighted mean of raster values along the line, the minimum and maximum values encountered, and the cell values for the start and end of the line.

Note that the tool cannot distinguish between thematic and categorical rasters automatically. By default it assumes the raster represents continuous data, so if the raster is a thematic raster you must explicitly use the ‘thematic=TRUE’ option. For thematic rasters there is an option to report the proportion of the line that falls within each of the cell values instead of the length of the line (use the ‘proportion’ option). If you use the ‘proportion’ option with a continuous raster then it is ignored.

NoData cells are ignored. Therefore, of the line crosses NoData cells this may influence the accuracy of the statistical summary. It is highly recommended you ensure that raster data exists for the entire area covered by the lines. Also, any lines that are entirely or partially outside of the extent of the raster will not be processed – they will be coded with NoData values (-2147483648) so should be easily identifiable.


isectlinerst(in, raster, prefix, [thematic], [proportion], [where]);

inthe input line data source
rasterthe input raster data source
prefixa short prefix to use in the summary statistic fields that are added, which end with MIN, MAX, LWM, BEG, END for continuous raster data, and V# for thematic raster data where # is each of the unique cell values. The prefix should be no longer than 6 characters, and should be related in some way to the raster dataset.
[thematic](TRUE/FALSE) controls whether the raster should be treated as a thematic (categorical) raster (default=FALSE)
[proportion](TRUE/FALSE) only applies to thematic rasters: records the proportion of the line in each cell value instead of the length of the line (default=FALSE)
[where]the selection statement that will be applied to the feature data source to identify a subset of features to process (see full Help documentation for further details)


isectlinerst(in=”C:datalines.shp”, raster=”C:datalandcov”, prefix=”LCOV”, thematic=TRUE);

isectlinerst(in=”C:datalines.shp”, raster=”C:datalandcov”, prefix=”LCOV”, thematic=TRUE, proportion=TRUE);

isectlinerst(in=”C:datalines.shp”, raster=”C:datadem”, prefix=”DEM”);


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