Points To Rectangles

Running programmatically

Creates rectangles from points in a point dataset and user defined width, height rotation angle and location of the point.

Inputs:

Outputs:

Notes:

Examples:

Width = 300, Height = 200, Angle = 15, Location = "Center"

Width = 300, Height = 200, Angle = 15, Location = "LL" (Lower Left)

Width = 300, Height = 200, Angle = 0, Location = "UR" (Upper Right)

Running Programmatically

(Go to TOP)

Parameters

Expression Explanation
Function Name PointsToRectangles
<input dataset> A String representing the input layer. Must be of Point type.
<output dataset> A String - the full name of the output layer.
<Location> Required. A String -This parameter defines what will be the location of the resulting rectangles in relation to the original points:
  • "LL" - Lower Left corner of the rectangles will be located on the input point.
  • "LR" - Lower Right corner of the rectangles will be located on the input point.
  • "UL" - Upper Left corner of the rectangles will be located on the input point.
  • "UR" - Upper Right corner of the rectangles will be located on the input point.
  • Any other string used will cause the centers of the rectangles to be located on the input point.
{Width} A Double representing the rectangle width
{WidthField} A String representing the name of a field in the in the attribute table of the input dataset. The field has the values for the size of the polygons to be created.
{Height} A Double representing the rectangle height
{HeightField A String representing the name of a field in the in the attribute table of the input dataset field name. The field has the values for the height of the rectangles to be created.
{RotationAngle} A Double representing the rotation angle.
{AngleField} A String representing the name of a field in the in the attribute table of the input dataset field name. The field has the values for the rotation angle of the rectangles to be created. The angle should be in Decimal Degrees and have Polar orientation - East = 0, anti-clockwise.

Running the function

ETGWPath used in the table below is the full path to ETGWRun.exe (E.G. "C:\Program Files\ETSpatial Techniques\ETGeo Wizards\ETGWRun.exe")

Language Syntax
Python subprocess.call([ETGWPath, "PointsToRectangles", "input dataset", "output dataset", "Location", "Width", "", "Height", "", "RotationAngle"])
.NET using ETGWRun.exe StartInfo.FileName = ETGWPath
StartInfo.Arguments = "PointsToRectangles" "input dataset" "output dataset" "Location" "Width" "" "Height" "" "RotationAngle"
.NET using ETGWOutX.dll PointsToRectangles(input dataset, output dataset, Location, Width, "", Height, "", RotationAngle)
ArcPy arcpy.PointsToRectangles(input dataset, output dataset, "Location" , "Width", "", "Height", "", "RotationAngle")

Notes:

(Go to TOP)