Monthly Archives: April 2014

Seven easy ways to start learning Python and ArcPy

I have some great news: you don’t have to be a programmer to write code! Thanks to languages like Python, coding is now available to the masses, and the GIS world is one of its newest audiences. The ArcPy site package provides access to the geoprocessing tools found in ArcGIS for Desktop. Using it can be a challenge if you are unfamiliar with Python, but with some basic knowledge, you can start using it to make your ArcGIS work flows faster and easier.

This post is broken up into sections based on different learning styles. You can choose to read, watch, or code your way into the world of Python, and each section will empower you with the knowledge for getting started with ArcPy. Here are some recommended resources I’ve used for teaching myself Python and ArcPy.


Learn by Reading

1. Learn Python the Hard Way (LPTHW)

Don’t be scared by the title – Learn Python the Hard Way (LPTHW) is probably the most popular online tutorial for learning Python. In fact, many “Pythonistas” at Esri started learning Python with this website! This exercise-oriented guide reinforces its teachings through repetition and practical usage of basic Python functionality, even if you have no prior experience. I recommend completing the first 32 exercises to equip yourself with the knowledge you need.

2. Think Python: How to Think Like a Computer Scientist

I recommend this site for those users who are used to a more “textbook” approach to learning. The book is produced by O’Reilly and is now free to the public. The approach is different than LPTHW, and some people may find it to be less fun to learn from, but it’s packed with useful information. The chapters up to, and including, “Files”, will be the most useful for ArcPy users, but reading subsequent chapters will help you understand a little bit about what’s going on “under the hood” in a Python module such as ArcPy.

Learn by Watching

3. The New Boston

The videos in this series are perfect for their format. They are concise (each video runs about five minutes), thorough, and show practical coding examples that you can follow along with or practice on your own. In the first 31 videos, this series covers just about all of the concepts you will need for getting started.

4. Khan Academy

Khan Academy has made free education available to everyone for a variety of topics, and their Python course was one of the first “classes” offered. The curriculum is similar to what you can expect from a Computer Science class, so it may seem a little challenging at first. However, if you stick with it, you’ll be thinking like a programmer.

Learn by Doing

5. Code Academy

This is an interactive Python course that teaches the basic concepts of Python by having you complete coding exercises. All the work is done online –you don’t even need Python installed on your computer to complete it! The site prompts you to complete small lessons and challenges, and is great for those users who don’t always have a consistent amount of time to contribute to studying. I would recommend completing the first 15 lessons if you want to understand more about Python.

Learn ArcPy

6. Esri Python Training

Esri’s training site is the best way to see Python in action, apply it to ArcPy and GIS workflows, and hear some great questions from users like you and I. The courses are designed for users with any level of experience with Python and ArcPy, so you’ll come back to this site time and again to learn new tricks or brush up on your skillset.

7. Python Scripting for ArcGIS

This is one of the only educational textbooks out there for learning the basics of ArcPy, and it helped me a lot when I started using ArcPy for the first time. The first four chapters are devoted to learning the ins-and-outs of basic Python functionality, and the rest of the book focuses on specific scripts. You’ll get a cohesive and complete introduction to ArcPy as you work your way through this book.

In addition, this Support Services Blog post talks about learning ArcPy, and very nicely outlines all the resources that are out there. Once you’ve finished reading my blog entry, you can concentrate on the one above!

Andrew O. – Desktop Support Analyst

– See more at:

Open-source map downloader: SAS Planet

It is free, open-source and its functionality is much better compared to any other similar software (including commercial). Made by Russian volunteers. It has English and Russian user interface options.

How to clip raster with specified row and columns

1. Use Draw Toolbar in ArcGIS to draw a rectangle and change the size of the rectangle to width = column * cell size, height = row * cell size

2.  Convert the rectangle graphic to shapefile

3. Clip the raster using the Clip tool. Check the option “Maintain Clipping Extent (optional)


Clip (Data Management)


Creates a spatial subset of a raster, including a raster dataset, mosaic dataset, or image service layer.


Clip illustration



IJGIS special issue on Space-Time Research in GIScience

The IJGIS special issue on Space-Time Research in GIScience with guest editors Mei-Po Kwan & Tijs Neutens is now available online at

Integrating R with ArcGIS using Python

import arcpy
import os
from arcpy import env
import sys
in_features = arcpy.GetParameterAsText(0)
in_raster = arcpy.GetParameterAsText(1)
out_csv = arcpy.GetParameterAsText(2)
pyScript = sys.argv[0]
toolDir = os.path.dirname(pyScript)
rScript = os.path.join(toolDir,"ExtractValuesToPoints.r")
arcpy.SetProgressor("default","Excuting R Script...")
args = " ".join([in_features,in_raster,out_csv])
cmd = "Rscript " + rScript + " " + args


Args <- commandArgs(trailingOnly = TRUE)
in_features = Args[1]
in_raster = Args[2]
out_csv = Args[3]

UC Geographers Develop a System to Track the Dynamics of Drought

Detecting drought before it causes more catastrophe: the news could go down like a cool drink of water for regions feeling the heat.


Date: 4/8/2014 9:00:00 AM
By: Dawn Fuller
Phone: (513) 556-1823

UC ingot   University of Cincinnati researchers are at work tracking drought patterns across the United States. Qiusheng Wu, a doctoral student and research assistant for the UC Department of Geography, and Hongxing Liu, a UC professor and head of the Department of Geography, will present details this week at the annual meeting of the Association of American Geographers (AAG) in Tampa, Fla.

drought graphic

To trace the dynamics around agricultural drought, the UC researchers implemented an Event-based Spatial-Temporal Data Model (ESTDM) to detect, track and monitor conditions. The framework organizes data into objects, sequences, processes and events.

The data was collected from the European Space Agency’s (ESA) Soil Moisture and Ocean Salinity (SMOS) satellite, which was the first of its kind dedicated to measure moisture near the surface of the soil. The study focused on four years of data (2010-2014), which included the devastating Texas drought in 2011 and the 2014 California drought.

The satellite uses an L-band (1.4 Ghz) passive microwave radiometer to analyze the spatial and temporal variations of soil moisture and ocean salinity. “Recent studies have shown that many historical drought events in the U.S. are closely related to La Niña, a phenomenon known for its periodic cooling of sea surface temperatures in the tropical Pacific Ocean. So in addition to measuring soil moisture for drought monitoring, it is also important to measure ocean salinity,” explains Wu.

drought graphic

The satellite can penetrate the Earth’s surface up to 5 centimeters, providing a soil variable for each pixel, which represents 25 kilometers. The satellite’s data collection occurred over a three-day rotation.

The researchers were examining patterns of spreading drought to develop predictions for future drought events.

“Soil moisture is defined as the ratio between volume of water and volume of soil holding the water, which is expressed in percentages, so high soil moisture indicates wet while low soil moisture indicates dry.

“By studying the soil moisture data from the satellite, we can see where the droughts begin and end, and what might indicate patterns of how it can spread over one large area. The pattern might be used to predict the drought in another location, so that those areas could take precautions to avoid the impact of an oncoming drought,” says Wu.

The Intergovernmental Panel on Climate Change (IPCC) – known as the leading international organization for the assessment of climate change – predicted in 2012 that droughts would intensify in some seasons and in many regions worldwide in the future due to reduced precipitation and/or increased evapotranspiration.

“Drought ranks among the most costly of all natural disasters. It has wide-ranging impacts on many sectors of society, affecting agriculture, economics, ecosystems services, energy, human health, recreation and water resources. By predicting the timing, severity and movement of drought events, we can provide fundamental information for planning and management in developing a response plan,” says Wu.

Future research will involve data gathered from a satellite that NASA is launching toward the end of the year, the Soil Moisture Active Passive (SMAP) satellite. The SMAP satellite integrates an L-band radar (1.26 GHz) and an L-band (1.41 GHz) radiometer as a single observation system combining the relative strengths of active and passive remote sensing for enhances soil moisture mapping. The combined radar-radiometer-based soil moisture product will be generated at about an intermediate 9-km resolution with three-day global revisit frequency. Wu says the accuracy, resolution and global coverage of SMAP soil moisture and freeze/thaw measurements would be invaluable across many science and applications disciplines including hydrology, climate and carbon cycle, and the meteorological, environmental and ecology applications communities.

The Association of American Geographers (AAG) is a nonprofit scientific and educational society that is dedicated to the advancement of geography. The meeting will feature more than 4,500 presentations, posters, workshops and field trips by leading scholars, experts and researchers. The AAG annual meeting has been held every year since the association’s founding in 1904.

Alex Tereshenkov

Programming and managing GIS

REDD+ for the Guiana Shield

Technical Cooperation Project

Dr. Qiusheng Wu @ University of Tennessee

Writing Science

How to write papers that get cited and proposals that get funded

GIS In Ecology

Providing Training, Advice And Consultation On The Use Of GIS In Ecology


On cities, land, ...

Scientia Plus Conscientia

Thoughts on Science and Nature


Learning hydrology with R

Karl Hennermann

GIS at the University of Manchester

GIS and Science

Applications of geospatial technology for scientific research and understanding.

Whitebox Geospatial Analysis Tools

Open-source GIS development and spatial analysis with Whitebox GAT


MATLAB-based software for topographic analysis

Anything Geospatial

Dr. Qiusheng Wu @ University of Tennessee

Dr. Qiusheng Wu @ University of Tennessee

Another GIS Blog

Dr. Qiusheng Wu @ University of Tennessee

ArcPy Café

Get all your ArcGIS Python Recipes here!