Select to view content in your preferred language

python spline loop failing

1750
1
12-06-2010 02:38 PM
by Anonymous User
Not applicable
Original User: takurkowski

In the attached code, when I run through a set of 5 input text files, only running steps 1-2, the loop works fine.  I get a set of projected shapefiles.

If I run it through steps 1-3, the first loops works, I get one interpolated raster tif, but then it errors out when running through the second text file in the loop.

I also tried this in the python window while adding all outputs to the TOC, and on the second file through, the XY event layer was created successfully (stored in memory somewhere?), but step 2 produced an empty shapefile and then the error from step 3 was "insufficient number of points" which makes sense because the shapefile had no points.

Can anyone see any obvious errors in the looping code or perhaps know why the second file that goes through step 3 fails?

All these steps work fine alone using arc toolbox.

General workflow is:

Create XY event layer from Lat/Long/Value txt file using GCS WGS84
project that event layer to AK Albers
interpolate using spline to 2000 meter resolution.

Thanks!
Tom Kurkowski
0 Kudos
1 Reply
ThomasKurkowski
Emerging Contributor
In step 3 I had set the processing extent to

arcpy.env.extent = "-2320000 55000 2160000 2760000"

which was in meters which makes sense for that step, but I needed to reset it once the processing went back through the loop to

arcpy.env.extent = "MAXOF"

on to the next error...

Tom
0 Kudos