Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

GridIndexFeatures - syntax error

$
0
0
Hi all,
I am trying to create a grid with this GridIndexFeatures tool. I keep getting a syntax error on the parameter for the "polygonWidth" and "polygonHeight".
I'm doing this in IDLE: here is what I got so far:
Code:

###script for the intersection of the 2 shapefiles
###

###import the basic mods for the geoprocessor

import arcpy, sys, os, traceback, math, string

###set up the workspace you're going to work in

from arcpy import env

arcpy.env.workspace = "C:\GIS_Data\PGE_MLPP\intergrid.shp"

#set local variable
outFeatureClass = "intersection"
inFeatures = "NonAOC"
polygonWidth = "528 feet"
polygonHeight = "528 feet"

###Execute the Grid

arcpy.GridIndexFeatures_cartography(outFeatureClass, inFeatures, "", "", "",
                                    polygonWidth, polygonHeight)

###Print
print "Done"

Here is the error:
Quote:

Traceback (most recent call last):
File "C:/Users/RLong/Documents/intersect1", line 23, in <module>
polygonWidth, polygonHeight)
File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\cartography.py", line 787, in GridIndexFeatures
raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Input Features: Dataset NonAOC does not exist or is not supported
ERROR 000398: Value must be positive
ERROR 000398: Value must be positive
ERROR 000892: The numeric value is outside of the valid range.
ERROR 000892: The numeric value is outside of the valid range.
Failed to execute (GridIndexFeatures).
I've done this script (and variants of it) several times, but SINCE I'VE INSTALLED SP5 this is happening. just sayin...

Any help is apprecieated.

Viewing all articles
Browse latest Browse all 2485

Trending Articles