Mapping Your GIS Data

I've already looked at some GIS applications available on Linux. Programs like GRASS and qgis provide a full set of tools to do GIS. Sometimes, that's really overkill though. You may just want to display some data geographically and create a map. For those cases, there is Thuban, an interactive geographic data viewer.

Most distributions should have a package available within their package management systems. If not, you always can download the sources and build it from scratch. It does depend on Python, among several other libraries, so you need to do a bit of a dependency dance. Binary downloads even are available for Windows and Mac OS X, so you can point your non-Linux friends to them.

If you don't already have data of your own, sources of public-domain GIS data are available on-line. Here are a couple: http://www.naturalearthdata.com/features and http://wiki.openstreetmap.org/wiki/Shapefiles. The files available on these sites will get you started with SHP files that contain at least basic features for most of the world.

Thuban is not as flexible as full-fledged GIS software and cannot handle very many data file formats. You can use SHP files, DBF database files and various image file formats. In the screenshots for this article, I simply grabbed several of the data files available on-line.

When you start Thuban, you end up with a completely blank slate (Figure 1). The first step is to start a new session, which you can do by selecting the menu item File→New Session (not much will change on the screen). In order to start building your map, you need to add layers that can be manipulated. I started by selecting the menu item Map→Add Layer and adding in an SHP file to give me the basic geographic attributes for my home province of New Brunswick (Figure 2). This includes several different geographical items, such as water, river banks and parks. The default display is not very interesting yet (Figure 3).

Figure 1. Starting Thuban gives you a blank slate.

Figure 2. Adding a new layer opens a file selection dialog where you can choose an SHP file.

Figure 3. By default, Thuban just displays all of the data with a single symbol color.

You can edit the way a layer is displayed either by double-clicking the layer within the list in the legend pane or by right-clicking the layer of interest and selecting Properties. This will pop up a new window (Figure 4). In this case, I selected the "type" field within the classification pane. The easiest choice at this point is to click the Generate Class button. The Generate Classification window will pop up, where you can click on the Retrieve From Table button to get a list of the possible values. I accepted the default gray-scale mapping for the colors, giving four new entries in the layer properties. But this is not very interesting either, yet. Selecting each of the new properties, you can edit the symbol and change the colors for each of the types (Figure 5). If you want to have a preview of what this will look like, you can click the Try button. If it doesn't quite look right, you always can click the Revert button to undo the changes and try something else.

Figure 4. Each layer has a properties window where you can control how the data gets displayed.

Figure 5. Using the Generate Class button is a shortcut to get you started.

Although every map begins with a single layer, it is very rare that a single layer is enough to show all the details you may want to have displayed. In this example, I don't have any roads on my map. A separate SHP file is available that has this information, however. So, I clicked on the menu item Map→Add Layer and added the file roads.shp. Opening up the properties dialog shows that this particular SHP file has several different attributes to play with. For now, I selected four different road types and highlighted them with four different colors. There is still a default color for any road types other than the four I selected. To make them go away on the map, you can select the default property and simply make it transparent. Then, only the four selected road types will show up. Now the map is starting to look a bit more interesting, and I need to start worrying about what order the layers are in.

Thuban will draw layers in the order they appear in the legend list, starting at the bottom and working its way up. You can move a particular layer up our down by selecting it and then using the buttons at the top of the legend pane.

Another type of layer you can use is an image layer. Obviously, the image needs to be geo-referenced in some way. Thuban supports the geoTIFF file format. If you place your image at the bottom of the layer list, you then can draw on top of it with the data in the SHP files.

To manipulate the map itself, Thuban uses a sort of mode system. To zoom in, you need to select the zoom button. Then, you either can use click and drag to select a region to zoom in on or simply click a spot on the map to re-center and zoom in. Once you have zoomed in, you can use the pan tool to move the view window around the map to highlight different regions. There are buttons to zoom you to specific scales such that the entire map is visible. This always takes you back to the default map view.

Two tools allow you to work with individual elements from an SHP file. The first is an information tool that pops up a detail window for any element you select. The second is a label tool. When you select an element, a dialog window pops up allowing you to select one of the properties to be displayed as a label.

Once you have a map you're happy with, you probably will want to save it for later use. Because Thuban works with sessions, all of your work in generating the map will be saved as a session within Thuban, as long as you remember to save it by clicking the menu item File→Save Session.

But, this doesn't help much if you want to use your map outside Thuban. There is an option to export a map as an SVG file by using the menu item Extensions→Write SVG Map. This is not the most efficient output available, however. My simple example here blew up to more than 50MB for a single map with two layers.

The other option is to print your map. Although you can print to actual paper, for a hard copy, you also can print to a file using the generic PostScript printer. This generates a PostScript file that will be a bit more manageable. You also can convert this PostScript file to other formats with relative ease. So, to get a PDF of your map, you can print to a PostScript file and then convert it to PDF with the ps2pdf utility. Now you have a map that you can share with friends and family.

______________________

Joey Bernard has a background in both physics and computer science. This serves him well in his day job as a computational research consultant at the University of New Brunswick. He also teaches computational physics and parallel programming.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

It does depend on Python,

professional translation services's picture

It does depend on Python, among several other libraries, so you need to do a bit of a dependency dance. Binary downloads even are available for Windows and Mac OS X, so you can point your non-Linux friends to them.
http://www.professionaltranslationservices.info/

Fantastic article i must say.

Anonymous's picture

Fantastic article i must say. Your article gives a lot of great information and inspiration. I'm impressed with your views on this topic and I agree with a lot of your ideas.
lamisil to buy

日(デイト)及び日と曜日を示すもの(デイデイト)が一般的で

Armani腕時計's picture

日(デイト)及び日と曜日を示すもの(デイデイト)が一般的で、日・曜日・月を示すものはトリプルカレンダーと呼ばれる。 数字による表示方法と盤面上を針(ポインター)で表示する方法がある。大型の日付針(デイトポインター)が時分針と共にセンターに配置されたものは識別のため針先が三日月型をしている。

++++

cnbestmall's picture

++++ http://www.cnbestmall.com ++++

Paypal online order accept, FREE SHIPPING

Nike AIr max, Shox, Rift, dunk, blazer, air force 1 shoes: 48 USD

Nike free running shoes: 42 USD

D&G, LV, Gucci, parda DC, polo, puma, supra shoes: 42 USD.

Timberland boot: 50 USD

T-shirts (polo, ed hardy, lacoste,gucci, lv, etc) $28

Jeans (AF, armani, bape, BBC, CA, coogi, D&G, Diesel, Evisu, Levis, gucci, true religion, versace) 45 USD

Down Coat jacket parka vests (moncler, canada goose, barbour, parajumpers, woolrich) 168 USD-268 USD

++++ http://www.cnbestmall.com ++++

In case you have basic

Anonymous's picture

In case you have basic knowledge on fake rolex watches watches and straightforward strategies to acquire, you may around the safer side but, you ought to be cautious and pick properly.

Nice post

frete fracionado's picture

experience on senior high scchool can i see in your post

I want to say Linux could

Erik Nadeau's picture

I want to say Linux could rule microsift. I love linux OS. I can do anything and everything. But Microsoft has nothing but visual graphics. Its is true that In most cases, we will want some form of DC current.

I want to say Linux could

Irma Campfield's picture

I want to say Linux could rule microsift. I love linux OS. I can do anything and everything. But Microsoft has nothing but visual graphics. Its is true that In most cases, we will want some form of DC current.

experience on senior high

Jalantikus.com Download Game PC dan Android Gratis Terbaru d's picture

experience on senior high scchool can i see in your post

now i have more experience

Jalantikus.com Download Game PC dan Android Gratis Terbaru d's picture

now i have more experience after read your article here

Cloud mapping #2

DerekH's picture

Cloud mapping

DerekH's picture

Another alternative is to build maps in the cloud - zero install and accessible from all platforms and OS.

QGIS not qgis

Tim's picture

Just FYI it is 'QGIS' not 'qgis'. Also thuban is really old and unmaintained - you might be better off looking at something like tilemill if QGIS is too much for you...

Regards

Tim

Otimo post

frete fracionado's picture

Otimo post de bom conteudo muito obtigado até mais acompanho seu blog sou do brazil frete fracionado

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState