Command Line or Graphical Workflow Editors

Matt Perry wonders if command line is a dying art. He lists automation, repeatability, documentability, accessibility, and accuracy as factors to consider in using command line tools over their GUI counterparts.

All the factors Matt considered for command line over GUI can be addressed if you use diagramming software. ESRI’s Model Builder and Safe’s FME Workbench both can solve all those problems and even allow you to better visualize what you are trying to accomplish. As someone who cut his teeth on ArcInfo 5, I find the Model Builder and Workbench refreshing and make be a better analyst. Being able to redirect to the visualizer and see what my output will be before running my model allows me to be more productive, rather than have multiple versions of output sitting in a folder.

Update: Better title, was “Command line or diagramming software”

5 Comments

  1. Jeff says:

    I think the term “diagramming software” is not the best word to describe those two tools.

    I’d rather call them “graphical script editors” or “graphical workflow editors”.

    Diagramming sounds like visio .. :)

    Besides that, I think you are right, and those “arrows” are more reliable than writing variable names in notepad, where you can scramble the variable names easily and do not see what is going wrong.

    Often, the best thing is a combination of command-line and graphical editing.

    Set up your translation in your graphical environment (modelbuilder or workbench) and then use a command-line script (yeah, good old dos .bat -files) to batch the translation and apply it to all the files in a folder …

    like

    for %%f in (*.shp) do (
    fme.exe myShape2TabConversion.fmw ^
    –inputFile %%f ^
    –outputFile %%~nf.tab ^
    LOGFILE_NAME %%~nf.log
    )

    In Geoprocessing, I would go for a Python script like

    import arcgisscripting

    gp = arcgisscripting.create()

    gp.workspace = something
    gp.addtoolbox(yourtoolbox)

    fcs = gp.listfeatureclasses(“*”,”ALL)

    fc = fcs.Next()

    while fc:
    gp.callyourmodelhere(fc)
    fc = fcs.Next()

  2. James Fee says:

    Yea I debated about what to call them and you are probably right, diagramming software is probably incorrect.

  3. Kyle says:

    Pretty good topic. I still use command line at ArcGIS, and I am the only one I know. I use Excel to write my commands and use cell references to set variables which I believe gives me better control over the variables than model builder. As an old AML guy I think command line script is the most brief and direct way to automate a task, with the benefits as mentioned. I’m not even talking about python or VB – just workflow geoprocessing at it’s most basic.

    Speaking of DOS – I used to get a lot of mileage out of personal geodatabases, ArcReader, batch files, and scheduled tasks. Think about that formula for a minute.

    I agree that it’s a dying art though. I feel sorry for those that never give the computer the commands, because otherwise the computer gives the user commands, and that’s never fun for long.

  4. Kyle says:

    One of the problems I have with the modelbuilder is that with the GPOverwriteOutput turned on, the modeler can omit a parameter and output to an incorrect workspace. What I like about script is that every one I write starts by setting the workspace parameter. Then I also lighten my workload by not having to define full paths all the time.

  5. Dan S. says:

    Oh, I don’t know about that. When it comes down to it, what you’re doing is programming. (“Script”: a short program.) And visual programming — AKA model builder — has shortcomings that the computer science community has never been able to overcome, not in 40 years of trying.

    Unless you need the screenshots to put into a powerpoint for your boss, I imagine most of us would strongly prefer tossing together a map calculator expression rather than wire together four or five different “add”, “subtract”, etc boxes.

    Time will tell, but I suspect that textual scripts and command lines will be back in vogue in the GIS community. They are already experiencing a renaissance of sorts in general computing: What is google if not a command line for the internet? I know I’m not the only one who doesn’t use bookmarks much anymore. And look at Quicksilver on the Mac, or Enso Launcher for PCs…