GME

Geospatial Modelling Environment

convert.tabletolines (Convert Table To Lines)

Creates lines from pairs of x, y coordinates in a table

Description

This tool converts pairs of xy coordinates in a table into to lines (polylines) in a new or existing line data source. The unique ID field of the input table is required so that you can join the line attribute table back to the source table.

This command is equivalent to the 'Add XY Line Data' tool in Hawthstools.

Syntax

convert.tabletolines(in, uidfield, fromx, fromy, tox, toy, out, [where]);

inthe input table data source
uidfieldthe unique ID field of the input data source
fromxthe name of the field containing the from-x coordinate
fromythe name of the field containing the from-y coordinate
toxthe name of the field containing the to-x coordinate
toythe name of the field containing the to-y coordinate
outthe output line data source
[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)

Example

convert.tabletolines(in="C:\data\coords.dbf", uidfield="LINEID", fromx="FROMX", fromy="FROMY", tox="TOX", toy="TOY", out="C:\data\lines.shp");

convert.tabletolines(in="C:\data\coords.dbf", uidfield="LINEID", fromx="X1", fromy="Y1", tox="X2", toy="Y2" out="C:\data\lines.shp", where="LINEID<1000");


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