GME

Geospatial Modelling Environment

genpointinpoly

Generates a single point for each polygon in the input data source

Description

This tool generates a single point for each polygon in the input data source. The point can be positioned using one of two settings. The LABEL setting, which is the default, generates a point somewhere inside the boundary of the polygon. The algorithm ESRI uses to determine the location of the label point is not published, but the point is guaranteed to be inside the boundary of the polygon. The CENTROID position places the point in the geometric centre of the polygon (the centre of gravity), which may not fall within the bounds of the polygon depending upon its shape.

The attribute fields for the polygons can be copied to the new point dataset using the 'copyfields' setting. By default the fields are not copied.

Syntax

genpointinpoly(in, out, [position], [copyfields], [where]);

inthe input polygon data source
outthe output point data source
[position](CENTROID or LABEL) if centroid the points are generated at the centre of gravity of the polygon (which may be outside of the polygon); if label the point is guaranteed to be inside the polygon but may not represent the centre of gravity (default=LABEL)
[copyfields](TRUE/FALSE) if true the attribute fields from the input dataset are copied to the output dataset (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)

Example

genpointinpoly(in="C:\data\boundaries.shp", out="C:\data\bndcentroid.shp", position="CENTROID", copyfields=TRUE);

genpointinpoly(in="C:\data\boundaries.shp", out="C:\data\bndlabels.shp");


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