Tag Archives: Python scripts

Tales from a burning river

Now that I have time I can get back to trying to work on this blog under the advice I was given once upon a time.  Try and write something for everyone everyday.  So today, I sat down with every intention of discussing how NE Ohio fit into my concept of Home as a Landscape Extent, and how all of that was influencing my current job search.  That will have to wait until later this week, after I’ve packed and opened up a couple of other projects (python/VB.NET).

So what I am working on today, or at least going to be working on today, relates to the User Interface within ESRI’s ArcGIS Desktop.   A couple of months ago I developed a customization of an Intersect operation, without getting into the nuts and bolts of what I do with it and how I do it, this customization allows me to filter the attribute fields that are included in the output feature class or shape file.  I used the arcgisscripting API obviously, so I didn’t rewrite the Intersect algorithim (that would be scary), but theres some stuff and then I get to this:

junk = temp1 + “;” + temp2

gp.Intersect_analysis(junk, outFeature)

gp.deletefield(outFeature, “FID_temp1 ; FID_temp2″)

then there’s more stuff that help to clean up the file structure.  So I like this, and my colleagues (other students, and a couple of professors) like this, however I have a couple of big limitations that I am going to try and fix.  First, I can only conduct this operation on two features at a time.  This is a big small problem, and it relates to the UI in that the script window in the GIS uses an “obtained by” tag to update the field map frame and this obtained by only works on one feature.  To fix this in the script I tried a simple split operation around the ‘;’ that delimits the multi input, but it breaks the availability of the obtained by update so I need to go back and look at that.  The second problem I have is that I am currently creating temporary files on the disk when I would much rather run the entire operation through the %SCRATCHWORKSPACE%\, so I am going back and looking at that today.

My apologies if you were really looking forward to some philosophical discussion of landscape but I’ll make it up to you later on, likely with a photo essay type entry.   Sound like a deal?


Follow

Get every new post delivered to your Inbox.