Description
This tool generates shapes (polygons) centred on the input points specified by the user. The currently supported shapes are: circles, diamonds, hexagons, squares, triangles (equilateral), rectangles and ellipses. The dimensions for the shapes can either be specified as a constant that is applied to all shapes, or as a field name that contains variable dimensions. The shapes are all created in a reference to the x axis, but you can specify a rotation parameters (again, either as a constant or a field name) to rotate the resulting shapes.
The input point always defines the centre of the shape. The dimension values expected depend upon the shape. CIRCLES expect a single dimension value representing the radius. DIAMONDS expect two parameters: one is the distance from the centre-point to the tips of the diamond that lie on the x axis, the second dimension is the distance from the centre-point to the tips of the diamond that lie on the y axis. HEXAGONS, SQUARES, and TRIANGLES expect a single dimension value that represents the distance from the centre-point to the middle of one of the edges. RECTANGLES expect two parameters: one is the distance from the centre-point to the middle of the edges the lie along (but perpendicular to) the x axis, the second dimension is the distance from the centre-point to the middle of the edges the lie along (but perpendicular to) the y axis. ELLIPSES expect two dimensions: one that is the distance from the centre-point to the edge of the ellipse along the x axis, and the second is the distance from the centre-point to the edge of the ellipse along the y axis.
Note that the rotation angle should be specified in degrees, not radians.
Syntax
genshapes(in, shape, dim, out, [rot], [where]);
| in | input points defining the center of the shapes to generate | |
| shape | the code of the shape to generate: 1=CIRCLE, 2=DIAMOND, 3=HEXAGON, 4=SQUARE, 5=TRIANGLE, 6=RECTANGLE, 7=ELLIPSE | |
| dim | the shape dimension constant(s) that are applied to all shapes, or the name of the field(s) in the point attribute table containing the numerical shape dimension values (see full help documentation for details on what these values refer to) | |
| out | the output polygon data source | |
| [rot] | the rotation angle constant (degrees) that is applied to all shapes, or the name of the field in the point attribute table containing the rotation angle (degrees) (default=0) | |
| [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
genshapes(in="C:\data\spnts.shp", shape=1, dim=120, out="myoutput.shp");
genshapes(in="C:\data\mygdb!mypnts, shape=6, dim=c(120, 40), rot=45, out="myoutput.shp");
genshapes(in="C:\data\spnts.shp", shape=1, dim="MYFLD1", rot=180, out="myoutput.shp");
genshapes(in="C:\data\referencelayer.shp", shape=6, dim=c("MYFLD1", "MYFLD2"), out="myoutput.shp");