1342 Rate this article:
No rating

Working with Shapefiles in IDL

Mark Alonzo
As a follow-up to the Using Map Projection Routines in IDL webinar, I wanted to show an example of reading entities from an ESRI Shapefile and visualizing them in a map projection. I’ve uploaded the example program and the Shapefile used in the example to the VIS Code Library; they can be downloaded directly from here. For data, I chose a U.S. Census Bureau 2008 TIGER/Line® Shapefile containing county boundaries for the state of Colorado. This Shapefile, and others for Colorado, can be obtained from the U.S. Census Bureau at http://www2.census.gov/cgi-bin/shapefiles/state-files?state=08. In the example program, NG_COLORADO_COUNTIES, a user can pass the name of a Colorado county as a string. The shape for the county is extracted from the Shapefile and displayed on a map projection. For example, to display Summit County, call NG_COLORADO_COUNTIES with:
IDL> ng_colorado_counties, 'Summit', fill_color='dodger blue'
Here’s the result: Summit County, Colorado Please try the example and read over the code—I tried to explain each step of the process: reading entities from the Shapefile, setting up a map projection and visualizing the entities in the map projection. If you have any questions, please let me know in the comments!
MOST RECENT

A Technical Dive into Creating Accurate Digital Terrain Models

6/27/2018

Live Webinar | July 25 Creating accurate digital terrain models (DTMs) is essential for modeling areas of... more »

The Science, and Art, of Hyperspectral Image Analysis

6/7/2018

Harris Geospatial Solutions – June 7, 2018 Automation is being touted as the wave of the future for... more »

SIGN UP & STAY INFORMED

Sign up to receive the latest news, events, technologies and special offers.

SIGN ME UP