ESRI Training Matters

Participate

Welcome to ESRI Blogs

Subscribe

Subscribe

Calendar

<November 2009>
SuMoTuWeThFrSa
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

The next time someone gives you a blank stare when you try to explain what GIS is, just send them to YouTube. In honor of GIS Day, a group of musically inclined GIS users in Austin, TX created this fun and rocking video. I'm already looking forward to GIS Day 2010 and next year's mix. The GIS community continues to amaze and entertain.

11/20/09 Note: Apologies to the group in Austin for incorrectly stating that GIS users in San Antonio created the GIS Day video. Keep up the great work, and go Longhorns!

Next week is a big week—Sunday kicks off Geography Awareness Week and Thursday is GIS Day. So here's a short, interactive activity designed as a teaching aid for those completely new to GIS. It's intended to reinforce essential key points about what this technology is.

Developed for the free Getting Started with GIS Web course, the goal in this activity is to drag and drop a list of words to correctly fill in the blanks in a few paragraphs that describe GIS. Some of us who are very familiar with GIS at times find it hard to explain the basic concepts in a way that novices or students can understand. Maybe this activity will help. If you're giving a GIS Day presentation, have your audience try it out and see if they got what you were talking about.

Take a break for a minute and try it out for yourself, just for fun of course. Will you get all the correct answers on the first try?

What is the definition of GIS?

 

This week we released Introduction to the HAZUS-MH Comprehensive Data Management System, the latest in a series of Web training courses covering Hazards U.S. Multi-Hazard (HAZUS-MH), a hazard loss estimation tool developed by the Federal Emergency Management Agency (FEMA). HAZUS-MH is a free extension to ArcGIS that facilitates a risk-based approach to disaster management.

Each year, natural disasters cost billions of dollars in damage, great loss of life, and a degraded quality of life for survivors. Communities and disaster management professionals use HAZUS-MH to plan for and mitigate risks posed by hazards such as floods, hurricane winds, and earthquakes.

Authored by Kevin Mickey, the Director of the Professional GIS Education Program at The Polis Center at Indiana University Purdue University Indianapolis, the Web series includes one free training seminar and seven one-module courses.

While anyone can use GIS tools to make a map, not everyone has a background in proper map design and cartographic theory. If decisions are based on inaccurate or misleading maps, the results can be disastrous. Creating and Publishing Maps with ArcGIS is a new instructor-led course from ESRI that prepares GIS users to successfully complete a variety of realistic mapping projects, including designing maps for the Web.

In the interview below, course author Eric Gillett shares his thoughts about the course and how it reflects current trends in GIS mapmaking. Eric is an education specialist in the Education Content group.


First off, what is your background and cartographic experience?

Eric: I started with ESRI in 1999. I was an instructor for almost 10 years and moved to Content one year ago. Prior to coming to ESRI, I managed the cartographic production for a regional map company in the Seattle area. Much of the map production was done using ArcInfo Workstation and other desktop publishing software. My academic background is in geography with an emphasis in cartography. Like many ESRI customers, I’ve had a personal interest in maps since I was very young. Cartographic Workflow: Planning 

Creating and Publishing Maps with ArcGIS replaces an older ESRI course called Cartography with ArcGIS. Obviously this new course doesn't have "cartography" in the title. Does this reflect a shift in thinking about GIS maps and the skills needed to create them?

Eric: This is a great question. Cartography is the art and science of creating maps and involves many academic aspects of how we see and interpret different forms of graphic communication including colors and symbols. Cartography is also a term that not everyone is familiar with, especially those that may be new to GIS and have not had any experience with the mapmaking process.

Creating and Publishing Maps with ArcGIS includes the necessary cartographic concepts one needs to know to produce high-quality maps in ArcGIS. Also, many people using ArcGIS need to understand the production workflow necessary to produce a high volume of maps, such as a map book or atlas, as well as other production-oriented tasks, such as printing and working with maps in digital files or served online. These topics go beyond cartography and really focus on how the map will be delivered as well as the tools and software needed. Cartographic Workflow: Data

The course description references a standard process that can be applied to map projects. Can you briefly describe this process? Is it complex? One size fits all?

Eric: This is definitely a workflow-oriented course. The workflow is not complex—it is a very logical progression of steps, starting with evaluating your audience, making your data ready for cartography, designing symbols, map layout, and output formats. The concepts of cartography and map production are presented in a logical order just as if you were in your office making a map. This is what the students will have to do after taking this course, so we really wanted to give them a set of specific steps and guidelines to follow when creating maps in their own organizations.

Each organization will certainly have a workflow specific to the data and maps that they produce. The workflow presented in this course forms a foundation for students to take back to their office and apply when creating their own maps. Additional detailed steps can easily be added to this workflow as needed. This is actually encouraged and discussed throughout the course.

Creating maps is a huge topic—how did you determine what the course should cover?

Eric: We wanted this course to be meaningful to anyone needing to have knowledge of cartographic design principles and also the workflow and ArcGIS tools used in the map production process. Because many people use many different types of data and map scales, there needed to be a variety of different data and maps presented throughout the course, both in the student exercises and in class discussions and activities. Cartographic Workflow: SymbologyAll the topics presented are part of a cartographic workflow.

We used feedback from students who had taken ESRI’s previous cartography course to understand how this course could better meet their needs. Students will get to spend much more time working with their data, including applying the correct use of map projections and generalization techniques. Also, students spend a considerable amount of time in class activities and exercises focusing on map element design and page layout.

This year, it seems like all the headlines have been about Web GIS and making killer Web maps. How is this course relevant for organizations that want to do Web GIS?

Eric: You’re correct, the emphasis in distributing maps and data is now through Web-based applications and this topic is covered in the course, including design differences between printed maps and Web maps. Students are also exposed to ArcGIS Server and learn methods to maximize the performance and usability of maps served online. This applies to static maps, such as a JPG or PDF file, and also to interactive map applications that allow for the use of GIS tools. While some of the design considerations are similar for both types of maps, there are also many differences. These are covered throughout the course. Cartographic Workflow: Layout

We're in an economic environment where training budgets are extremely tight. Why should a manager should approve a staff member to attend this course? What benefits can the manager expect to see from the training?

Eric: This is a great question and applies to so many people in our user community. Maps are one of the deliverable products in almost all GIS projects and they need to be understood and easily interpreted. I can tell you, being an ESRI cartography instructor for many years, that most people using ESRI software have never had any formal education in how to design a meaningful and useful map. Maps are vitally important to anyone working in a field in which GIS software is used. Cartography and map production techniques should be considered as fundamental knowledge and skills of anyone using GIS software in their work. It’s that important.

This course covers tools and techniques that are needed but not well understood by many ArcGIS users. Many time-saving techniques are taught throughout the course that will make students more efficient when creating their maps and also result in better-quality, more readable maps. 

Do you have a favorite section of the course? Are there any examples in the course that reflect your personal interests?

Eric: I would have to say that the tools and techniques of text placement are one of my primary areas of interest. There are so many tools and settings that can help students with the placement of text on their maps. This is an area that a lot of ESRI software users are not very familiar with. Historically, text placement has been a time-consuming process. However, ArcGIS has many tools that will greatly speed up the process of placing text on your maps. Cartographic Workflow: Output

Another topic covered in detail in this course is the use of elevation data. Several techniques are discussed and students get a chance to create and work with different types of elevation data, including hillshading, relief tinting, and contours. Most people really enjoy working with elevation data and this section should be very useful and informative.

I think one of the most exciting parts of the course is the project on the final day. This is a self-directed project where students use the skills they have learned to create a map on their own. They will apply the cartographic workflow to this project just as they have throughout the course. Students are provided with the data and we give them hints to complete their project, but much of the design of symbols and map layout are left up to the individual.

This is where students can get creative and also spend time with their instructor on the portions of the map design process that are important to them. I think students will also find this is one of the most meaningful and beneficial portions of the course.

The ArcGIS 9.4 release will include many productivity improvements to help you get your GIS work done faster. But ArcGIS 9.4 won't be released until next year—so here are some tips you can try out in ArcMap right away. The 10 shortcuts below can shave milliseconds off common tasks, and hey, milliseconds count when you're trying to get stuff done. You just may be able to get to lunch five minutes earlier and beat the crowd. That alone is going to save you at least 10 minutes, more if you're going to Old Ebbitt.

Working with Maps

  1. To activate a data frame, hold down the Alt key and click the data frame name. 
  2. To create a copy of a layer within the same data frame, hold down the Ctrl key and drag the layer up or down. If multiple layers are selected, you can copy all of them at the same time by Ctrl-dragging. (When dragging a layer into a different data frame, the layer is copied by default. If you want to move a layer to a different data frame, hold down Ctrl while you drag it to the new data frame.)
  3. Hold down the Alt key and click a layer name to zoom to the extent of that layer.
  4. Select (click) a layer and press Enter to open its layer properties dialog box.
  5. Hold down the C key while any tool is active to pan the map. Hold down X to zoom out, and Z to zoom in. This shortcut is especially useful when you need to select features that are geographically disbursed.

Working with Tables

  1. To quickly open a table, hold down the Ctrl key and double-click a layer or table in the Table of Contents; alternatively, select the layer or table and press Ctrl+T.
  2. Outside of an edit session, press the spacebar to select or unselect a row.
  3. Press Ctrl+U to switch (reverse) a selection.
  4. Double-click a field name to sort the field in ascending order. Double-click the field name again to sort in descending order.
  5. Click a field name and press Ctrl+H to turn off (hide) the field. (To display the field again, go to the layer properties dialog box > Fields tab, check the field name, and click OK.)

You can find these tips and many others in the ArcGIS Desktop Help.

ArcGIS Online, now in public beta, is a destination that offers a lot to the GIS users who choose to visit. The site is a rich content source for GIS data, maps, and tools; it offers tools for quickly creating a Web map, and it's a venue for sharing your GIS work and collaborating with other GIS users.

The collaboration piece is especially intriguing, and the out-take below from Sharing Your Maps Using ArcGIS Online—last week's live training seminar—shows how it can work.

In the demo, ESRI instructor Matt Baker uploads a map service to ArcGIS Online, mashes up the service with an ArcGIS Online imagery service to create a custom Web map, then shares the content with a group he has created. Molly Zurn from the ArcGIS Online team simulates the role of a GIS user who shares an interest in the subject of Matt's Web map. Molly collaborates by adding another map service to the Web map and saves her version out to a new Web map, which she in turn shares with the group.

This is a workflow that could help many ESRI users support and move their own GIS projects forward. Not to mention that collaboration almost always brings welcome synergy—and synergy often results in positive change. 

Isn't that the destination we're all trying to reach with GIS?

Watch the demo

The complete recording of the seminar will be available on the ESRI Training Web site in the next week or so.

 

Last week's post featured Performing Analysis with ArcGIS Desktop, a new instructor-led ESRI training course that teaches a five-step process for GIS analysis. Today's post shows how to apply that process using ArcGIS Desktop software and datasets from ESRI Data & Maps.

Suppose you want to analyze access to health care services in Riverside and San Bernardino counties in southern California.

Locator map of study area

The five steps in the analysis process are:

  1. Frame the question
  2. Explore and prepare data
  3. Choose analysis methods and tools
  4. Perform the analysis
  5. Examine and refine results

Step 1. Frame the Question

This step seems straightforward because typically you're assigned a project to obtain specific information. Some projects involve answering several questions derived from a high-level question. How you frame the questions helps determine which GIS tools and methods you use for the analysis.

In this example, you might frame a preliminary high-level question: Is the distribution of health care facilities consistent with the population distribution in Riverside-San Bernardino, CA? This question could be broken down into the following sub-questions:

  • Where are facilities that provide health care services located?
  • What is the population distribution within the study area?
  • Do areas with the highest population density have the greatest number of facilities?
  • Within the study area, are there areas with high population density but no health care facilities? 

Step 2. Explore and Prepare Data

This step can be the most time-consuming. If you don't have all the data needed for an analysis project, the ESRI Data & Maps DVDs that come with ArcGIS Desktop are an excellent source of high-quality spatial data. Be aware that this data is intended for internal use and some of the datasets have restrictions on commercial use and distribution. Make sure you review the ESRI Data and Maps > Getting Started with ESRI Data and Maps > Redistribution rights topic in the ArcGIS Desktop Help before sharing the data with others.

For this example, data representing health care facilities and California counties and population data are needed. Depending on how fine-grained the analysis needs to be, ZIP Codes or other levels of geography such as census tracts or census blocks could be used to map population distribution in the study area.

Step 2a: Explore Data 

You explore data using ArcCatalog. For each dataset, preview the features, attributes, and metadata to determine whether the data will be useful for your analysis and what kind of preparation, if any, may be required. Questions to ask about the data include:

  • What is the data format? 
  • When was the data collected (how current is it)? 
  • How detailed is the data—at what scale was it collected?
  • What coordinate system does the data use? Is the data projected?
    • Best practice is to project all datasets into a common coordinate system before doing analysis.
  • Does the feature geometry (i.e., point, line, polygon) work for the analysis?
  • Does the data have the attributes you need?
  • Does the data have any access or use constraints?

For this example, the following StreetMap datasets were selected:

  • hospitals (ghospitl) — this data includes "traditional" hospitals as well as other medical facilities.
  • ZIP Codes (zip_poly) — this data includes population attributes.
  • counties (dtl_cnty) 
  • states (dtl_st)

Step 2b: Prepare Data

To start, you need to decide what data format to use. Project data doesn't have to be all in the same format, but it can make things easier. The important thing is to verify that the analysis tools you need accept your data format; also consider whether you will be distributing the data created by the analysis. You can use the geoprocessing tools in the ArcToolbox Conversion Tools toolbox to quickly convert data to another format. If you have access to the ArcGIS Data Interoperability extension, you can directly work with many spatial formats.

  • The ESRI Data & Maps datasets are stored in SDC (Smart Data Compression) format. For convenience, all the datasets for this project were exported to shapefiles and saved to a local disk. 

Organizing data into a project folder can simplify analysis tasks (you can specify a default input workspace) and facilitate sharing your work with others.

  • For this project, a file folder was created to organize the shapefiles.

If you are working with geodatabase feature classes, you could copy or import them into a single file-based geodatabase. You might also want to create separate folders or geodatabases to store intermediate (temporary) data output from analysis operations as well as final data.

Extracting data to have the same extent as the study area helps speed up processing time and enhances data visualization in ArcMap. In this example, the project datasets cover the entire U.S. 

  • Clipping the hospitals and ZIP Codes to the extent of the two counties will be part of data preparation.

In order to clip the data, you can create a selection layer of just Riverside and San Bernardino counties. You can export the selection layer to its own shapefile or geodatabase feature class, but you don't have to. Selection layers are saved as part of the map document (.MXD).

So here's how the data preparation tasks flow for this project:

  • Start ArcMap, add the project data, and zoom to the study area. 
  • Using the Select Features tool, select Riverside and San Bernardino counties.
  • Right-click the Counties layer and choose Selection > Create Layer From Selected Features.
  • The selection layer is added to the Table of Contents. Drag it below the ZIP Codes layer and rename and symbolize as desired.
  • Unselect the two features in the Counties layer.

Next, clip the hospitals and ZIP Codes.

  • Display the ArcToolbox window and expand the Analysis Tools > Extract toolset. Click to enlarge
  • Double-click the Clip tool to open its dialog box.
  • For Input Features, drag the U.S. Hospitals layer into the text box.
  • For Clip Features, drag Riverside-San Bernardino (the selection layer) into the text box.
  • For Output Feature Class, browse to the project folder, enter a name, then click Save. 
  • Click OK to run the tool. 
    • When the clip operation completes, a layer representing hospitals within the study area is added to the Table of Contents.
  • Change the symbol as desired and turn off the U.S. Hospitals layer.
  • Repeat the steps to clip the U.S. ZIP Codes layer.

Step 3. Choose Analysis Methods and Tools

To choose the appropriate methods and tools for an analysis project, consider the questions framed in Step 1 and document the methods and tools that will answer each one. 

Question Methods and Tools
Where are facilities that provide health care services located? Examine distribution of hospitals on the map.
What is the population distribution within the study area? Symbolize ZIP Codes layer based on population density using graduated colors.
Do areas with the highest population density have the greatest number of facilities? First, do a visual analysis of the map to get a general idea, then do a spatial join operation between the Hospitals and ZIP Codes. The output of the spatial join will be one record for each hospital and the ZIP Code attributes.
Within the study area, are there areas with high population but no health care facilities? Summarize the ZIP field in the table output from the spatial join. The summary table will include a count of hospitals in each ZIP code that contains a hospital, plus population data for each ZIP Code. 

It's very helpful at this step to diagram the analysis. The diagram doesn't have to be anything fancy (although it can be if you like that sort of thing). An easy thing is to quickly draw on paper or a whiteboard like the example below. 

Workflow diagram example

Step 4. Perform the Analysis

If you've diagrammed the process in step 3, then in this step, you simply follow the diagram, completing each task in sequence. For complicated analyses, you may want to create a model in ModelBuilder to automate the process. A model also allows you to quickly change a parameter and run the model again to explore different scenarios. Map showing distribution of hospitals and population density

  • Examine the distribution of the hospital features on the map. Zoom and pan as needed.
  • Symbolize ZIP Codes with graduated colors based on the POP07_SQMI (2007 population density) attribute.

A visual analysis of the data shows the greatest number of hospitals and the most densely populated ZIP Codes are in the southwestern part of the study area.

You can get more information by performing a spatial join between the Hospitals and ZIP Codes layers.

  • Right-click Hospitals and click Joins and Relates > Join.
  • In the dialog box, choose to join data from another layer based on spatial location.
  • Choose ZIP Codes in the drop-down list of layers, specify the output feature class name and location, and click OK.

The output of the spatial join is a new point layer that contains all the hospital features plus the attributes of the ZIP Code each facility falls within. The ZIP field contains the five-digit ZIP Code in which the hospital is located, and the PO_NAME field contains the post office name (corresponds to the city name) for that ZIP Code. The POP07_SQMI field shows the population density associated with each hospital's ZIP Code.Click to enlarge

Sorting the PO_NAME field reveals that multiple hospitals are located in some ZIP Codes.

The last step is to summarize the ZIP field. This operation will output a table that contains one record for each ZIP Code that contains a hospital, plus a field containing the count of hospitals within each ZIP Code. You can also choose to output statistics for numeric fields (such as POP07_SQMI).

  • In the joined table, right-click the ZIP field and choose Summarize.
  • For summary statistics, check First and Last for NAME (this is the hospital name) and check Average for both POP2007 (total population) and POP07_SQMI.
  • Specify an output location and name, then click OK.
  • Choose to add the result table to the map and open it.

Step 5. Examine and Refine Results

So what information does the summary table provide? Click to enlarge

The Count_ZIP field tells you the number of hospitals in each ZIP Code that contains a hospital. Sorting the POP07_SQMI field reveals that the most densely populated ZIP Codes in general are the ones that have multiple hospitals. Of the 23 ZIP Codes that have less than 2,000 people per square mile, only three have more than one health care facility. All the ZIP Codes that have more than 2,000 people per square mile have at least one health care facility.

The analysis shows that the distribution of health care services is consistent with the distribution of the population within the study area—that is the most facilities are located where the population is most dense. You could refine this analysis by considering the number of patients each facility can serve and other variables of interest. You could also extend the project to analyze whether access to health care services in the low-population areas is adequate. The current map indicates that residents of ZIP Codes with a low population density may have to travel a great distance to reach a hospital.

Fall has arrived, but data from last summer's ESRI Training survey is still being analyzed. One survey question asked respondents to tell us what GIS topics they would need training on in the next 12 months. The information gleaned from this question helps us focus our resources on developing training products that best meet our users' needs.

This year, it was gratifying to learn that the most requested training topic was "GIS analysis techniques and methods." More than 55 percent of respondents selected this topic. It just so happened that we got the report on the survey results around the same time we released our new instructor-led course, Performing Analysis with ArcGIS Desktop.

We took our time designing and developing this course (more than a year!) because we wanted to offer our users a signature course on analysis. After all, the power of a GIS to inform decision making derives from the robust analysis tools and capabilities it offers.

Performing Analysis with ArcGIS Desktop takes a holistic approach to teaching GIS analysis techniques and methods. The course is built around a five-step process you can apply to any project to generate reliable results for decision makers.

  1. Frame the question
  2. Explore and prepare data
  3. Choose analysis methods and tools
  4. Perform the analysis
  5. Examine and refine results

Course exercises provide opportunities to practice with many ArcGIS analysis tools, including those used for site selection, surface analysis, weighted suitability modeling, and regression analysis, as well as spatial statistics tools used to examine data patterns and find hot spots. Some complex spatial modeling techniques like conditional branching using Python scripts and iteration are also covered.

If you're someone who needs training on GIS analysis, this signature course is the one to sign up for.

A recording of the Getting Started with ArcGIS API for Microsoft Silverlight/WPF training seminar (broadcast live last month) was recently added to the ESRI Training Web site. This free one-hour seminar is designed to help experienced Web developers understand the features and functionality available through the API.

In the demonstration below, presenter David Martinez of the ESRI product marketing team steps through the process of downloading the ArcGIS API for Microsoft Silverlight/WPF from the ESRI Resource Center, creating a project in Visual Studio, and adding some of the code behind a rich Internet application.

Other demonstrations in the seminar show how to add map services and interactive map navigation, execute a geoprocessing task that calculates drive-time polygons, display a progress bar while the geoprocessing task executes, and publish a Silverlight application.

If you want a closer-up look at the code used to build the seminar demos, you can download it from the Code Gallery on the ArcGIS API for Microsoft Silverlight/WPF Resource Center. Look for the entry named LTS Demos for ArcGIS API for Silverlight.

Watch the demo 

We got a lot of requests on our 2009 ESRI Training survey for more courses on scripting, particularly with Python, the scripting environment included with ArcGIS. Currently, we have two instructor-led courses that focus entirely on creating geoprocessing scripts, one Web course that includes a module on scripting, and a free training seminar and Instructional Series podcast that cover Python scripting.

So why the big interest in scripting? The main reason is that scripts allow you to automate GIS workflows that would be time-consuming to complete one task at a time. For example, suppose you needed to update attributes for thousands of features on a daily basis. You can write a script to update the attributes, and have the script run at a specific time each day (or at night after working hours). 

The steps below show a quick way to create a Python script using what I call the F-C-P-M-T method (that's Find, Copy, Paste, Modify, Test). Like developers who find sample code and modify it for their own purposes, you can find example Python script code in the ArcGIS Desktop Help and modify it for your needs. To work through the steps, download and unzip the data.

The steps assume you have ArcGIS 9.3 or 9.3.1, Python 2.5, and PythonWin installed on your computer or a network location you can access and write data to.

  • Note: If you are going to write Python scripts, you'll want to have PythonWin, an application that provides a friendly script-creation, testing, and debugging environment. PythonWin 2.5.1 is included on the ArcGIS 9.3 and 9.3.1 installation media, but it isn't installed by default. You can also get PythonWin version 2.5.4 from http://www.python.org/download/releases/2.5.4/

The Scenario

Suppose you work in public safety for the city of San Diego and your task is to identify trolley stops that may need to be evacuated and closed in the event of an emergency on a nearby freeway. You have feature classes representing the San Diego freeways, trolley lines, and trolley stops. You want to write a script to buffer the freeways, then overlay the trolley stops and the buffers to output all the trolley stops that may be impacted in an emergency to a new feature class. 

Why bother to write a script to do this fairly simple GIS operation?

  • Reusability—you can quickly change the buffer distance if you need to just by editing the script, then run the script to create new buffers.
  • You can share the script file with colleagues, who may want to use the script for their own purposes. They could modify the buffer distance and specify different feature classes to create data for their own projects, all without ever opening ArcMap or ArcCatalog.
  • You can also save the script as a custom tool and include it in a geoprocessing model.

Step 1: Find Geoprocessing Tool Script Code

  • Start ArcMap, open a new empty map document, and display the ArcToolbox window. Click to enlarge
  • Expand the Analysis Tools toolbox and the Proximity toolset.
  • Right-click the Buffer tool and choose Help.
  • In the help window, scroll down until you see the Scripting syntax section.
  • Below the syntax is a script example. Expand the example to see the code.

Step 2: Copy/Paste Example Code into a New Script

  • Click Start > All Programs > Python 2.5 > PythonWin.
  • From the File menu, choose New > Python Script and click OK.
  • With the Script1 window active, from the File menu, choose Save As and save the script with the name BufferIntersect.py in a local folder.Click to enlarge 
  • Go back to the ArcGIS Desktop Help window, select all the code in the script example, right-click the selection, and choose Copy.
  • In PythonWin, right-click inside the BufferIntersect.py window and choose Paste.
  • Close the ArcGIS Desktop Help window and navigate to the Analysis Tools toolbox > Overlay toolset > Intersect tool.
  • Right-click the Intersect tool and choose Help.
  • Again, scroll down to the script example, select all the code, right-click the selection, and choose Copy.
  • In PythonWin, press Enter to move your cursor to a new line, then right-click and choose Paste.
  • Close the ArcGIS Desktop Help window and minimize ArcMap.

At this point, you have created a script that contains example code that will run the two geoprocessing tools you need for your project. Because you have combined the examples, your script contains some extra code you don't need, plus of course the example code refers to data you don't have. The first thing to do is examine the code and remove the duplicate lines. 

Step 3: Modify the Code to Meet Your Needs

Python scripts that incorporate ArcGIS geoprocessing functionality start with these two lines of code:

import statement

  

 

In the script window, you see this code at the very top of the first example and again in the second example, which starts with a comment that explains the code's purpose. Including comments in a script is good practice so that others can understand what the code is doing. In Python, comments display in green italic text and are always preceded by a pound sign (#). When the script is run, comments are ignored.

  • Cut the Purpose and "Create the Geoprocessor object" comment lines and paste them at the top of the script.
  • Edit the purpose text to reflect this project's purpose and change the second comment text to: Import ArcGIS scripting module, create the Geoprocessor object, and specify the workspace and toolbox. Click to enlarge
  • Add a Date Created comment as the first line in the script.
  • In the gp.workspace line, change the path to reflect the path where you saved the San Diego geodatabase. Note that Python is case-sensitive.
  • The gp.toolbox = "analysis" line of code means that the geoprocessing tools referenced in the script are located in the Analysis toolbox. This is true for your project, so you don't need to change it.
  • Select and delete the second (duplicate) lines that import the ArcGIS scripting module and create the geoprocessor object.

Step 3a: Modify the Code for the Buffer Tool

The example code for the buffer tool includes all seven parameters accepted by the tool. Only the first three parameters are required (input feature class, output feature class, and buffer distance).

    • To learn more about the parameters, open the ArcGIS Desktop Help for the tool and look at the scripting syntax.

For this project, you only need the required parameters. Notice that parameters are separated by a comma in Python.

  • Edit the comment text about what is being buffered to reflect this project.
  • Change the input and output parameters as follows:
    • Input feature class: freeways (remember, Python is case-sensitive)
    • Output feature class: Freeway_Buffers

In the example code, the buffer distance is a string (surrounded by quotes). For this project, you are going to enter an explicit numeric distance. Click to enlarge

  • Select and delete "Distance" and replace it with 1320.
    • The distance is specified in feet because the freeway data units are feet.
  • Delete the last four optional parameters from the example code.

Step 3b: Modify the Code for the Intersect Tool 

The example code for the intersect tool includes error handling. The try and except statements are used to handle unexpected errors during the code execution. For this simple project, you won't include error handling. Additionally, the example includes multiple geoprocessing operations and optional parameters for the intersect operation. For this example, you only need the intersect code (gp.Intersect_analysis) and you will use only required intersect parameters (the inputs and output).

  • Delete the try: statement and the except: statement.  
  • Delete the comment about setting the workspace and the line of code that specifies the workspace—you have already taken care of this at the top of the script.
  • Edit the comment for the intersect code (starts with # Process) to describe the purpose of this intersect operation.
  • Use the Backspace or Delete key to move the comment and intersect code up to be just below and aligned with the buffer code (remove the indentation from the intersect section).
  • Modify the intersect code as follows:
    • Inputs: trolleystop and Freeway_Buffers
      • Notice that the input feature classes are separated by a semicolon and that quotes are used only before the first input and after the last input. Be sure to keep this formatting.
    • Output: StopsNearFreeways
  • Delete the last three optional parameters.
  • Delete the comments and lines of code that buffer, clip, and generate statistics and delete the print statement at the bottom.

The code for the geoprocessing operations now meets the project needs. When the script is run, you want confirmation that the code is executing properly. You can add print statements to display a message in the Interactive Window after each tool runs.Click to enlarge 

  • Place your cursor at the end of the buffer line of code and press Enter.
  • Type print "The freeway buffers have been created."
  • Place your cursor below the intersect line of code and type print "The intersect was completed." 
  • Save the script. 

That's it, you're done. The script is ready to test.

Step 4: Run the Script

  • Click the Run button Run, then click OK.
  • If you can't see the Interactive Window, from the Window menu, choose Interactive Window. (If you don't see it on the Window menu, use the View menu.)Click to enlarge 

After a moment, in the Interactive Window, you should see the print statements you entered. 

  • If your script does not run correctly, carefully compare your code to the code shown in the last graphic of step 3, make any fixes, save and run the script again. Note, however, that if the buffer portion ran correctly the first time but the intersect did not, and you re-run the script, you will get an error because the buffer output will already exist in the geodatabase. Solution? Use ArcCatalog to delete the buffer output (Freeways_Buffer), then run the script again.

If you like, you can verify the data was created using ArcMap.

Click to enlarge

  • In ArcMap, click the Add Data button, navigate to the location where the data was output, and add the Freeway_Buffers and StopsNearFreeways feature classes.

  • Explore the data as desired. When you're finished, exit ArcMap and PythonWin.

Want to Learn More? 

This was obviously a very simple scripting exercise intended to show how you can find example Python code and combine it to create a script that does something you need to do. To create robust scripts, however, you need to invest some time learning Python concepts and syntax. 

  • The training seminar linked above is a cheap investment (only one hour and free!) to learn some basic Python programming concepts. The seminar originally aired in 2005 but the content is still applicable.
  • The instructor-led courses linked above will get you well on your way to being a script master.
  • A couple of recommended books for beginners are Learning Python, 3rd Edition (by Mark Lutz) and Core Python Programming, 2nd Edition (by Wesley Chun). Many books have been written, however. One of them is sure to appeal to you.

 

While reviewing responses to the 2009 ESRI Training survey that recently closed, a couple of themes quickly emerged. We always include an open-ended question for survey takers to give us their thoughts in their own words. This year the question was, "What changes to ESRI Training would help you most?"

No surprise, cost was the number one change requested—as in, we need more low-cost and free training from ESRI. As one respondent this year nicely phrased it, "[I need] more financially friendly training options."

And, out of all the individual comments we received, the following one stood out: "In my case it would be to offer more free courses. Not because the courses are not worth paying for but because I am penniless. I am excited about what I have been learning and would like to learn more."

Penniless, thanks for taking the time to answer our survey question. It was so nice to read that you're excited about learning GIS. When you have time, explore the free training options on our Web site. There are more than 100 free options on a variety of topics (not even including all of our Instructional Series podcasts). I hope you find something new to learn that helps you get the most out of the GIS tools you use. We will continue to add to our catalog of free training.

"More Locations and More Dates" 

What I did find surprising, however, was the second theme. Many, many respondents requested more instructor-led training classes closer to their specific location—a dramatic increase over past surveys. Of course it makes sense, since traveling to a distant training location is difficult, if not impossible, for most users this year—because travel is directly related to cost (see theme number 1).

Some respondents exhibited amazing prescience, like the one who asked for "Instructor-Led courses where the lectures are recorded and you can watch them at your own pace," and the one who told us, "I am interested in remote training options as particular courses are not offered locally due to low turnout. Perhaps there is some way to leverage video-conferencing with regional offices."

Bingo, said I (out loud even). It feels great when we can provide exactly what our users ask for.

New Options for Greater Access to Instructor-Led Training 

Over the last year, we have been feeling our customers' pain and know all too well that training budgets have been cut to the bone for many. As a result, we have been developing training soluClick to enlargetions that take into account both our users' desire for instructor-led training as well as their inability to travel.

So what exactly are the results? Instructor-led remote classroom and instructor-assisted video training are now available. Because some ESRI learning centers cannot offer every instructor-led course on a regular basis (due to low demand in their particular region), these new solutions make it easier to access courses across the U.S. Particularly with instructor-assisted video training, which allows us to schedule multiple courses in one classroom, we can better meet user demand for specific training courses while continuing to deliver a high-quality instructor-led experience.

We're still working on implementing some back-end technology changes that will make it easy to see the entire range of instructor-led training options in your area. For now, the best way to view our offerings is to use the Location drop-down list on the instructor-led class schedule to search for all classes in your desired location and see what comes up. In the near future, we hope to give you a better way to search the class schedule. 

To everyone who completed our 2009 ESRI Training survey: Thank you. We wanted to hear from you and we did. As usual, we were amazed at the thoughtful responses you submitted. There were lots of great suggestions that will be keeping us busy for the rest of the year and beyond.

ESRI Educational Services recently released a six-part Virtual Campus Web course series on the ArcGIS Data Interoperability extension. Jointly developed by ESRI and Safe Software, the series starts by teaching the basics of what data interoperability actually means and the benefits it offers for productivity, then takes you all the way through to developing custom tools you can share with colleagues. Along the way, you learn best practices for applying the software's powerful data translation and transformation tools. The first course in the series is free.

Each course provides approximately two hours of content, including a hands-on exercise designed to let you practice with the tools and features discussed in the presentation. Those who don't have the ArcGIS Data Interoperability extension can request free 60-day trial software to complete course exercises.

There's no rule that says you have to take the six courses in sequence (or even take all six). However, if you are interested in taking all six, we do recommend you tackle them in sequence as the early courses cover terminology and tools that the later courses assume knowledge of. We also highly recommend the free first course for those new to data interoperability concepts.



More Learning Resources for ArcGIS Data Interoperability

In the podcast below, Kim Avery, ESRI product manager for ArcGIS Data Interoperability, and Ryan Cragg, a senior trainer at Safe Software, discuss the capabilities of the ArcGIS Data Interoperability extension and preview the Web course series. 



The free training seminar below is also a useful overview for those completely new to ArcGIS Data Interoperability.



When people finish an ESRI training course, often they tell us they learned a lot, loved the course, but how do they get their own data to work with ArcGIS? Where can they find the specific data they need? The training data used in course exercises is developed and manipulated (by us) to meet specific learning goals, and exercises are scripted to ensure consistent results. For those new to GIS in particular, there's a need to fill the gap between using the software in a training class and doing GIS on their own back at the office.

In previous posts we covered working with Excel and Access data in ArcGIS. This post provides a tutorial to show how you can fairly easily create your own spatial data from scratch using ArcGIS Desktop and free resources from ArcGIS Online. The steps covered are:

  1. Adding an ArcGIS Online service to an ArcMap map document.
  2. Exploring information about the service.
  3. Creating a new file geodatabase and feature class in ArcCatalog.
  4. Digitizing new features in ArcMap and assigning attributes to them.
  5. Projecting a feature class.

Note: The instructions below were developed for ArcGIS Desktop 9.3 or higher, but they also work if you're using ArcGIS Desktop 9.2. Some menu commands and dialog boxes may be different.

The Example

Suppose you work for a non-profit organization and you want data about local sports venues that can be used for fundraisers. You want to be able to show the venues on a map and easily access information about their capacity, accessibility, ownership, proximity to other points of interest, and amenities such as snack bars, number of restrooms, etc. You have searched, but the data you want doesn't exist anywhere as far as you can tell. But no worries, with just a bit of work, you can create this data yourself.

Add ArcGIS Online Data to ArcMap

A common way to create spatial data is to digitize features (trace them onscreen) using imagery as a reference background. ArcGIS Online provides access to high-quality imagery that can be added to ArcMap and used to digitize your features of interest.

  • Start ArcMap and open a new empty map document.
  • From the File menu, choose Add Data From ArcGIS Online.

The ArcGIS Online Resource Center Web page opens and shows available map services, both free and for-fee. For this example, the free World Imagery service will work well. It's a good idea to always view the description for a map service before opening it to see if it will meet your needs. In this case, it does. Click to enlarge

  • Click World Imagery, then click Open. The World imagery group layer displays in ArcMap at its full extent (the world).
  • Zoom in to your area of interest. In this example, we are interested in sports venues in Redlands, California.
    • Tip: You can use the Find tool's Places tab to search for Redlands, CA. Once found, right-click the result in the dialog box and choose Zoom To.
    • Turn on the Boundaries and places and Transportation sublayers.
  • Close the ArcGIS Online Web browser window.

Take Time to Plan

Before you start creating data, you need to make some decisions.

  • Level of detail — What geometry should you use to represent the sports venue features, points or polygons? Points are easier to create (one click each) but will they give you the desired detail later when you map them? What do you need to be able to do with this data once it's created?

  • Accuracy — At what scale do you want your features to be created? What is the resolution of the imagery you're using as the background? That resolution determines the resolution (and accuracy) of the data you are creating. Your new data is only as accurate as the data you're digitizing from.

  • Coordinate system — Does your organization require a standard coordinate system or commonly use datasets from other agencies that are stored in a particular coordinate system? If so, it's a good idea to use the same coordinate system so all the data will align correctly when displayed together on a map. What coordinate system does the reference imagery use? When you added the service to ArcMap, the data frame's coordinate system was set to the coordinate system used by the service, which means that if you need to use a different coordinate system for your data, it's possible there could be alignment problems when you digitize. One solution is to create the feature class with the same coordinate system as your reference imagery, then after digitizing your features, project the feature class to have the desired coordinate system.

  • Data storage format — Shapefile, geodatabase, or something else? Will you be adding this data to an existing database? Will you need to share the data with colleagues?

Only after thinking through all the issues and doing any necessary research are you ready to create data. For many projects, you have to apply your own local knowledge of the data you're interested in. For example, suppose you know where the sports venues are in Redlands (it's a pretty small town after all).

You decide to create polygon features to represent the sports venues, and to store the data in a file geodatabase feature class. To figure out the appropriate accuracy and coordinate system, you need more information about the imagery. In ArcMap, you can use the Identify tool to access metadata for the imagery.Click to enlarge

  • Click the Identify tool, then click anywhere on the map.

You see basic information about the World imagery layer, including the date it was collected (December, 2003), the resolution and accuracy (in meters), and the source (USGS).

  • Close the Identify window.
  • In the table of contents, right-click the World imagery sublayer and choose Properties.
  • Click the Source tab and scroll down to see the coordinate system.
    • It is GCS_WGS_1984.
  • Click OK to close the dialog box.

Now that you have decided on the geometry, data format, coordinate system, and accuracy (the imagery accuracy is fine for your purposes), you are ready to create your data.

Create the Geodatabase and Feature Class 

Before you start digitizing, you need to create the geodatabase and feature class to store the data. You work in ArcCatalog to do these tasks.

  • Open ArcCatalog and navigate to the location where you want to create the geodatabase.
  • Right-click the folder and choose New > File Geodatabase, then give the geodatabase a meaningful name.
  • Right-click the new geodatabase and choose New > Feature Class. The New Feature Class wizard opens.
  • In the Name field, type a meaningful name for the feature class. By default, polygon is selected as the feature type. Since this is what you want, click Next.

Now you need to specify the coordinate system. You will use GCS_WGS_1984.

  • In the New Feature Class wizard, expand Geographic Coordinate Systems > World and click WGS_1984.
  • Click Next twice to accept the defaults for XY tolerance and configuration keyword and get to the Fields list.

By default a new feature class has an ObjectID field and a Shape field only.Click to enlarge You will add just two fields at this time: Name and Description. Both are text fields that will help identify the individual features you will create. After digitizing, you can add more fields to store all the desired attributes for this feature class.

  • Click in the empty cell under SHAPE and type Name. Press Tab and make sure Text is selected in the drop-down list.
  • Press Tab again to select the next empty row.
  • Type Description, tab to select Text as the field data type, then press Tab again.
  • Click Finish.

The new feature class is added to the geodatabase and you see it in the Catalog tree. With the basic structure created, you are now ready to digitize features in ArcMap.

  • In the Catalog tree, click the new feature class and drag it into ArcMap. Close ArcCatalog.

Digitize Features in ArcMap 

The YMCA in Redlands has a roller hockey rink and an outdoor pool that would both make good venues for fundraisers. You want to include these features in your dataset. You will start by zooming in to the YMCA location and digitizing the roller hockey rink. To create features you must be in an edit session. Hockey rink location

  • Zoom in to the area that contains the YMCA buildings. For those who don't know Redlands, use the Go To XY tool Go To XY tool and zoom to the coordinates (in decimal degrees) -117.176, 34.055.
  • Display the Editor toolbar (right-click next to the Help menu and choose Editor).
  • From the Editor menu, choose Start Editing.
  • On the Editor toolbar, click the Sketch tool Sketch tool.
  • On the map, click with the Sketch tool anywhere on the roller hockey rink boundary line. Drag with the mouse to trace along the rink outline and click to create vertices when the boundary line changes direction.
  • When you get to the end of the feature (back at the first vertex), double-click to finish.

Selected hockey rinkThe new feature is selected. Now you will add attributes for it.

  • On the Editor toolbar, click the Attributes button Attributes button.
  • On the right side of the Attributes dialog box, click in the Value field next to Name and type Hockey rink.
  • Click in the Value field next to Description and type YMCA roller hockey rink, then press Enter.
  • From the Editor menu, choose Save Edits.

That's it. You have just created spatial data. To create features for the other sports venues in Redlands, you would repeat the process above:

  1. Zoom to the feature.
  2. Use the Sketch tool to trace the feature boundary. 
  3. Add attributes.
  4. Save your edits.

If you want to practice, digitize the features below.

Feature Name Coordinates
YMCA outdoor pool -117.177, 34.055 (just to the left of the hockey rink)
University of Redlands Ted Runner Stadium -117.165, 34.068
University of Redlands Thompson Aquatic Center -177.165, 34.067
Ford Park Tennis Courts -117.159, 34.043
Moore Middle School soccer fields -117.15, 34.049

After digitizing all the features, save your edits and choose Stop Editing from the Editor menu.

Project the Data

For convenience, you used the ArcGIS Online service coordinate system when you created the feature class used for digitizing. However, your organization usually works with data stored in a NAD83 projected coordinate system. You can use a geoprocessing tool to project the new data.

  • Open ArcCatalog and close ArcMap without saving changes to the map.
  • Click the Show/Hide ArcToolbox button ArcToolbox to open ArcToolbox.
  • Expand Data Management toolbox > Projections and Transformations > Feature, then double-click the Project tool to open it.
  • For Input Dataset or Feature Cass, drag the feature class you created into the text box.
  • For Output Dataset or Feature class, type feature class name_NAD83. Make sure the path to the output matches the path to the input (i.e., that you're outputting to the correct geodatabase).
  • For Output Coordinate System, click the properties button and click Select.
  • Double-click Projected Coordinate Systems > UTM > NAD 1983 > NAD 1983 UTM Zone 11N.prj, then click OK.

You see a green dot next to Geographic Transformation (optional). The green dot means you need to specify a transformation.

  • Click the drop-down arrow and click NAD_1983_To_WGS_1984_5.
    • Click to enlargeHow do you know which transformation to choose? The Mapping Center did a very useful post on this topic.
  • Click OK.
  • When the projection process is complete, close ArcToolbox.

In the Catalog tree you see the new projected feature class. If you preview the table, you'll notice that the Shape_Length and Shape_Area attributes now show appropriate measurements.

At this point, you could open ArcMap, add the projected feature class to the map, and add fields to the feature class table to store all the attributes of interest for the sports venues. After adding the fields, you can add values to them using the Field Calculator or by starting an edit session and using the Attributes dialog box. To get the actual information you want to store as attribute values, you may need to do some Internet searches, make some phone calls, or even visit the physical sites (this is called ground-truthing in GIS).

If you've followed the steps above, hopefully you're realizing that creating data for use in a GIS isn't difficult, though it may require some resourcefulness on your part. The main point is, when you can't find the data you need, consider making your own. ArcGIS provides many tools to help you do this.

If you want to learn more about editing in ArcMap, on September 17th we're broadcasting Editing in ArcGIS 9: Tips and Tricks IV, the latest in this popular series of live training seminars presented by ESRI instructor Colin Childs.

Map of CanadaHave budget cuts or freezes made traveling to attend training a no-go in your organization? On August 25-27, ArcGIS Desktop II: Tools and Functionality will be taught in the ESRI Virtual Classroom.

Users have told us that getting approval to attend a training class can be difficult if travel is involved. By offering our most popular instructor-led training class online, we hope that those of you who are new to ArcGIS will find it easier to get the training you need. Because, while the economy has slowed down in the last year, the pace of technology change hasn't. It's important to keep GIS skills up to date. 

This course includes lots of exercises for hands-on practice applying ArcGIS tools. You will learn how to accomplish common GIS tasks such as displaying data stored in a variety of formats on a map, symbolizing and labeling map features, creating and editing data, working with tables, and performing GIS analysis operations to solve spatial problems. Knowledge of basic GIS concepts is assumed.

This is a great opportunity to get instructor-led training on ArcGIS Desktop without having to justify travel dollars.

Orange bullet Get details on this class

This was the question posed by Maryland Governor Martin O'Malley during the plenary session at last week's ESRI International User Conference. ESRI founder Jack Dangermond presented O'Malley with the President's Award in recognition of Maryland's pioneering GIS work, in particular the StateStat Web site, which O'Malley initiated and champions as a government performance-measurement tool.

O'Malley repeated the question throughout his acceptance speech, saying that it represents the fundamental desire people have to understand the world around them and create connections between themselves and their environment. In other words, people want to visualize where they are in relation to where other people and things are. Of course, the GIS cognoscenti have long understood this.

Click to enlarge

Maryland uses GIS to share information and make state government operations more accessible, accountable, and efficient. The state Web sites include rich GIS Web mapping applications built on ArcGIS Server and the ArcGIS API for Flex.

For example, RecoveryStat, a subsite of StateStat, provides maps of Maryland's federal stimulus spending allocations by local jurisdiction. You can also see the locations and allocations for specific projects that are underway. The Web maps are a great tool to help Marylanders evaluate whether the state is spending the federal monies wisely (and a great example for other states to follow).

Yes, well, the Web sites are interesting, but what does this have to do with training? The connection is this.

The idea of using GIS for performance measurement and efficiency is spot-on relevant for both the public and private sectors, especially given this "Great Recession" economy we're in. When budgets are tight, it pays to invest in technologies that bring long-term efficiencies and the ability to measure the effectiveness of business operations.

But, in order to get the benefits of any technology, there must be people who know how to apply the technology.

  • If a software product is just sitting in its box somewhere in a system administrator's office because no one knows what to do with it, the organization has wasted its investment.
  • If a software product has been installed and is being used in a production environment, but only a small fraction of its functionality is being utilized, the organization has either spent way more than necessary or it is not achieving all the benefits it intended by making the technology investment.

Consider Training Needs When Purchasing Technology

If organizations spend the time to think about training needs at the time of technology purchase, they are more likely to successfully implement the technology and realize the operational benefits. What should they think about?

  • Who will use the technology (specific job titles and names)?
  • Who will be involved with supporting the technology (specific job titles and names)?
  • What tasks will the users be expected to complete using the technology? 
  • Do the users have the required knowledge and skills to complete those tasks?
  • If not, what level of training will they require to perform the tasks as expected?
  • What ongoing skills development will be required after the initial training?

Once this information is collected, organizations are prepared to start exploring specific training courses and formats that will best meet their needs.

Training Resources for Creating Rich GIS Web Maps

If you check out the Maryland Web sites and feel inspired to follow their example, the free training resources below are a great place to start exploring how to go about it. All are available 24/7 on the ESRI Training Web site


When you're ready for more in-depth training, the instructor-led courses below are recommended.


Governor O'Malley talked about the power of GIS to strengthen connections. Be sure to connect with us on Thursday, August 27th for the Getting Started with the ArcGIS API for Microsoft Silverlight/WPF live training seminar. This free seminar continues this year's theme of sharing your GIS content via effective Web maps.

More Posts Next page »

Contact Us | Privacy | Legal | Site Map | Careers