uDig GIS: A First Look
Part of an ongoing series of on open-source geographic information system (GIS) programs, this article offers an introduction to uDig GIS. uDig is for GIS users of all levels, from beginners to advanced.
In earlier articles, I covered another great GIS application, Quantum GIS (QGIS). One of these previous articles is a general introduction to QGIS while the other illustrates how to integrate GIS data into QGIS. Just pop the term “GIS” into the search box here at the site and you'll get a nice list of articles.
In this particular article I will install and explore an example with uDig. To illustrate some of uDig's basic features, I will download and load geospatial data related to land cover in my own Ingham County, Michigan before European settlement occurred. The Michigan Geographical Library has data for download that illustrates the (theoretical) land cover in the state from the early 1800s in the shapefile format, one of the most common geospatial data formats.
Whoa, Back up a Sec: What is uDig?
To those who are new to GIS I generally tell them it involves "mapping with a computer". While this description is a bit oversimplistic, it captures the broad purpose of GIS. A more accurate description is, as the folks at Quantum GIS say, that a GIS is a collection of software that allows you to create, query and analyze geospatial data. I would further add that one can integrate any kind of geographic information and then find relationships among that information, and display it how you wish.
Our program uDig, then, is a Java-based open source desktop GIS platform built on top of the Eclipse Rich Client Platform. It runs on Linux, Mac or Windows. The application was initiated and is hosted by the Canadian firm Refractions Research; it is currently developed by an international community of contributors. Refractions offers consulting and systems integration services related to enterprise-level geospatial applications.
uDig supports OpenGIS and other de facto industry standards and has a user-friendly GUI. It is also customizable. uDig would be analogous to ArcGIS from ESRI, i.e. the desktop application for editing GIS data. In an OpenGIS context, the elements PostGIS, MapServer and GeoServer are the other three components that make up an enterprise-level GIS system.
Some key data sources that are supported include PostGIS, Web Map Service (WMS), Web Features Service (WFS), Geography Marketup Language (GML) files, shapefiles and image types like GeoTIFFs.
Interestingly the name uDig stands for User-friendly, Desktop, Internet, GIS.
You can download uDig for free from Refractions Research Web site, whose URL is below.
Once you download and unpack the archive, simply run the executable file udig and you'll be up and rolling.
Finding the Data
There is a ton of great geospatial data out there on the Internet, with the most common format being the workhorse shapefile. Living in the State of Michigan, I often utilize the fantastic Michigan Geographic Data Library (MGDL), which has loads of great data, including census information, land cover and use, aerial imagery, geology, soil data, natural features, topography and much more. It truly is a great public resource, and many other jurisdictions offer similar depositories. The link to the MGDL can be found below.
Loading the Shapefiles
Once we run the executable for uDig, GUI will appear with four different sections – Projects, Layers, Catalog and (the unlabeled) Map Editor. The Project section is the 'container' for what we will undertake; the Layers tab is our 'table of contents' of sorts for keeping track of each geospatial element we will load; the Catalog helps us keep track of all of our data sources; the Map Editor will display the geospatial elements we will load into uDig. The GUI looks like this:
The next step is to load the shapefile. We do this by going first to the Layer menu and choosing Add and then finally choose Files from the Data Sources dialogue box that pops up. Then go and find the shapefile, which in our case is called land_cover.shp. Although a shapefile is composed of several different files, uDig will default to show only those files carrying the suffix “.shp”, which is the sole file we need to load.
Once we load the shapefile, our interface will look like this:
As you can see, the Map Editor is now occupied with a visual representation of the shapefile.
uDig offers you numerous tools, but for a moment let's have a quick look at some basic navigation tools. While the different zoom tools are intuitive (Zoom In, Zoom Out and Adjust Current Zoom), there is also a Pan tool which is indicated by two crossed arrows. The Pan tool is super useful since it allows us to drag our map hither and yonder as we please. There is also a dual Info/Distance tool, the former of which allows us to click on the map and get information about its elements, and the latter of which allows us to measure distances on our map. I was personally having trouble with the Info tool, which should allow you to click on any part of the map and show the information about it, e.g. in our case what land-use type it is or its area.
Making Our Map More Than a Blob
In our example, the map of Ingham County has shown up as simply a big green square with 'squiggles' all over it. Each of areas delineated by the squiggles represents a different feature. In our case, each feature is an area that belongs to one of several different land-use categories. If you click on the Table tab on the lower part of the interface, you can see how the shapefile is backed up by an Attribute Table, which is the simple database contains all of the information about the different features on our map. Each feature in the Attribute Table contains a wide range of descriptive information: a label (an ID number), total area, perimeter, ID, vegetation code, land-cover type and others.
In order to give some visual distinction to our map, we need to give each cover type its own color. In other words, we will be symbolizing the data.
In order to symbolize our data, we will use the Style Editor, which can be found in the Layer menu under Change Style or, alternatively can be selected by pressing the icon that looks like a painter's palette just below the Layers tab.
The value of the Style Editor will only become evident after choosing the option called Theme in the upper left. This option will bring up several different drop boxes along the top, which offers us many different options for categorization. Our goal is to give each land-cover type a unique color. Therefore we will select COVERTYPE from the Attribute dropdown menu, and make sure that the number of classes, i.e. cover types, is selected. In our example there are 12 different classes, each of which will have its own color. You then choose an option from the Palette menu to create the range of colors that best fits the layer. I happened to choose Pastel1. Once we hit OK, our map of Ingham County will be all colorful with a distinct color for each land-use type. Here is how it looks:
Our map is now visually useful and we can see which land-use types were dominant, which are Beech-Sugar Maple forest and Oak-Hickory forest.
Selecting Desired Features
Another really sweet feature of uDig is the ability to visually select particular attributes and highlight them in the Map Editor. In our case, it would be nice to highlight all of the instances of a certain land cover type, for example. So, let's highlight all the instances of Mixed Conifer Swamp in Ingham County.
First, we'll go to the Attribute Table by selecting the Table tab below. Let's select the attribute COVERTYPE and enter the term Mixed Conifer Swamp in the search box and hit ENTER. All instances of this land-cover type will be highlighted. In order to view all the instances of this land-cover type on the map, click on the icon labeled Show Selected Data option, which looks like a dashed square with a magnifying glass hovering above it. Now all areas that were once Mixed Conifer Swamp are highlighted on the map as illustrated here:
This is a very powerful visualization tool.
A Few Items to Note About uDig
This example of displaying and selecting land-use types only scratches the surface of what you can do with uDig. It is a very powerful tool for manipulating geospatial data. In the future I will write more articles that expand on its feature set.
Before closing the article, I just want to mention a few things. Note that one can add any number of layers besides the single one we have. For instance, we could add layers with other geospatial elements such as roads, rivers, current (rather than historical) land use, etc.
I should also mention that uDig saves project files in a folder that it creates in your home directory, called uDigWorkspace. You can find your projects here when you come back to them in a new session.
uDig is truly a powerful GIS application that can do much more than I have explained here. There is plenty of material for additional articles on not only uDig but also other open-source GIS programs, which I will pursue in the coming weeks.
I wish you fun and success as you explore uDig!
Michigan Geographic Data Library
James Gray is Products Editor for Linux Journal.
- Three EU Industries That Need HPC Now
- William Rothwell and Nick Garner's Certified Ethical Hacker Complete Video Course (Pearson IT Certification)
- Preseeding Full Disk Encryption
- Chemistry on the Desktop
- FinTech and SAP HANA
- Two Factors Are Better Than One
- HOSTING Monitoring Insights
- Hodge Podge
- GRUB Boot from ISO
- Five HPC Cost Considerations to Maximize ROI