GME

Geospatial Modelling Environment

genshapes (Generate Shapes)

Generates shapes (polygons) centred on a set of input points, currently supported shapes are: circles, diamonds, hexagons, squares, triangles (equilateral), rectangles and ellipses

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]);

ininput points defining the center of the shapes to generate
shapethe shape to generate (options: CIRCLE, DIAMOND, HEXAGON, SQUARE, TRIANGLE, RECTANGLE, ELLIPSE)
dimthe 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)
outthe 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");


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