GME

Geospatial Modelling Environment

sumlinelengthsinpolys

Sums the lengths of the portions of all lines that intersect each polygon

Description

This tool sums the lengths of the portions of all lines in the specified line data source that intersect each polygon in the polygon data source, and writes the result to a new field in the polygon attribute table. You may optionally also specify a weight field in the line attribute table that is used to weight the line lengths: the length of the line intersecting the polygon is multiplied by the weight value.

This can be a computationally intensive program to run with large datasets. In such cases ensuring that your input data sources have a spatial index built will improve processing efficiency.

Syntax

sumlinelengthsinpolys(line, poly, field, [weight], [where], [update]);

linethe input line feature source
polythe input polygon feature source
fieldthe output field name
[weight]the name of the field in the line attribute table to weight the line lengths by (default=no weight field)
[where]the selection statement that will be applied to the polygon feature data source to identify a subset of polygons to process (see full Help documentation for further details)
[update](TRUE/FALSE) if TRUE and you specify an existing field, the existing field will be updated rather than generating an error message (default=FALSE); warning: this option will result in overwriting of existing data and is therefore potentially dangerous.

Example

sumlinelengthsinpolys(line="C:\data\roads.shp", poly="C:\data\counties.shp", field="ROADLENGTH");

sumlinelengthsinpolys(line="C:\data\roots.shp", poly="C:\data\plots.shp", field="LINESUM", weight="WIDTH");


Messages

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

An apology for failing to respond to correspondence in recent months  Read more...

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

Sign up for the newsletter if you wish to receive notification of updates, new functionality, bug fixes, and other related news

Links

Open Source GIS

Copyright © 2001-2010 Hawthorne L. Beyer, Spatial Ecology LLC