Open Table of Contents

Polygon Coordinates

This function is not available via the GUI of ET GeoWizards.

Calculates the coordinates of the centroid or the label points of the polygons from a polygon dataset in the units of the spatial reference of the dataset, Decimal Degrees or Degrees Minutes Seconds.. Two new fields are added to the attribute table. The names depending on the Calculate option and the output units and the are:

If the input dataset is projected and the selected output units are Decimal Degrees or Degrees Minutes Seconds, the shapes are projected on the fly to the Geographic Coordinate System of the projection of the input dataset before calculating the coordinates.

Command line syntax 

ET_GPPolygonCoordinates <input_dataset> < | Center | Label> < | Dataset Units | Decimal Degrees | Degrees Minutes Seconds> {precision} {use_direction}


Expression Explanation
<input_dataset> A Point feature class or feature layer.
< | Center | Label> Calculate Option. A String indicating what coordinates will be calculated - the Centroid or the Label point
< | Dataset Units | Decimal Degrees | Degrees Minutes Seconds> Output Units. The units to be used for the calculations.
{precision} An Integer between 0 and 8 representing the number of places after the decimal point to be used.
{use_direction} A Boolean. If True - a direction for coordinates in Degrees Minutes Seconds (3525'34.23"W), If False - (-3525'34.23")

Scripting syntax

ET_GPPolygonCoordinates (input_dataset, calculate_option, output_units, precision, use_direction)

See the explanations above:
<> - required parameter
{} - optional parameter

Copyright Ianko Tchoukanski