GME

Geospatial Modelling Environment

convert.pointstopolygons (Convert Points To Polygons)

Converts an ordered seqence of points to polygons

Description

This tool converts the points in a point data source to polygons in a new or existing line data source. An integer unique ID field in the point attribute table is required to distinguish between different output polygons, and another integer field is required that defines the order in which points will be connected. This order field does not have to start at 1 for each polygon, so if your point attribute table is already ordered you can either use the FID field, or better yet add a suitable order field using the addcodedfield command. The last point in the sequence does not have to be the same as the first point (this tool will attempt to close the polygon by connecting the first and last points).

Syntax

convert.pointstopolygons(in, uidfield, orderfield, out, [where]);

inthe input point data source
uidfieldthe unique ID field in the point data source that identifies collections of points that make up each line)
orderfieldthe point attribute field that can be used to sort the points into the correct order (must be numeric or date, but not a date stored as a text field)
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.pointstopolygons(in="C:\data\plotcorners.shp", uidfield="PLOTID", orderfield="SEQ", out="C:\data\plotpolygons.shp");

convert.pointstopolygons(in="C:\data\boundarylocs.shp", uidfield="BNDID", orderfield="ORDER", out="C:\data\burns.shp");


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