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]);
| in | the input table data source | |
| uidfield | the unique ID field of the input data source | |
| fromx | the name of the field containing the from-x coordinate | |
| fromy | the name of the field containing the from-y coordinate | |
| tox | the name of the field containing the to-x coordinate | |
| toy | the name of the field containing the to-y coordinate | |
| out | the 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");