How many times did you need to create melodramatically a extent polygon in order to select/clip some given data layer?
This script tool was inspired by the Arc Generate command in ArcInfo Workstation. Simply stated this tool creates a Feature Class populated with equally distributed polygons or points, Given a coordinate extent and values on how to divide it. The most simple case is just creating a rectangular polygon.
Examples:
1) Creating an administrative division of an area into equally sized rectangular polygonal tiles.
2) Creating a array of regularly distributed points, for sampling values from a raster grid.
3) Clipping data to a given extent. Using this tool in conjunction with the clip_analysis tool, one can create a clip_by_extent tool.
The zip archive includes the script and a toolbox which in it there's a tool definition of the script and an a example model using it.
I'll be happy to receive your feedback.
****** Update (Apr. 21st 2006) ******
In an oversight on my part, I defined the tool's left,right,top and bottom
input boxes to accept only integer values as valid arguments.
If one wishes, the tool can be easily changed/fixed to accept float
numbers, as the script itself can accept those. Just right click the tool,
and in the parameters tab change the type of the aforementioned input
boxes to float.
****** How to use with ArcGIS 9.2 and above ******
I wrote this script for ArcGIS 9.1. In ArcGIS 9.2 ESRI changed the way python
instantiates the GeoProccesor object in the script. In order for pre-9.2
scripts to work one needs to install PythonWin (which was the old way to
instantiate the GeoProccesor object).
PythonWin is located on the 9.2 setup DVD here:
[DVD-Drive]:\Desktop\PythonWin\pywin32-207.win32-py2.4.exe
and on the the 9.3 setup DVD here:
[DVD-Drive]:\Desktop\PythonWin\pywin32-210.win32-py2.5.exe
There's a Word document in these directories that explains
all of this in detail.
BTW there a new tool introduced in ArcGIS 9.2 called Fishnet
that makes my script obsolete. You can try using that instead,
though I think mine is still more intuitive :-).
The .py file is the script while the .mdb is a geodatabase
with a toolbox tool that point to the script.
--
Eran Rivlis
|