Learning Java – A GIS Perspective

Caitlin Dempsey


If you examine the GIS industry you will find a great diversity of applications of the technology, from business geographics to conservation. One of the hardest parts of learning a field so large is determining the most essential skills required in order to become productive. Programming with Java is very similar. This article picks three areas that represent the basic skills a person who wants to use Java effectively should have:

  • understanding of the Java language syntax
  • familiarity with the Java applications programming interface (API)
  • understanding of concepts from software engineering

Although an understanding of each of these areas may not provide you with a “how-to” list to set up your brand of Internet map server, they will give you a better understanding of the breadth of the Java language.

Language Syntax

Your first goal is to learn the language syntax. The syntax includes things like variables, loops, conditional statements, operator precedence, and creating functions. Java inherits a lot from the C programming language in this area and if you already know C, then learning the syntax in Java will be very easy. A book like Java In a Nutshell (a sample chapter is available here) provides a concise description of the basic elements of the language. The book omits any detailed discussion of how these elements are applied and is a fast way to familiarize yourself with the syntax, assuming you have some experience with another language. For those of you new to programming, the Java Ranch website is a great place to build up your understanding of the basics. I especially like this site, because it offers online multiple-choice questions as a good way to drill and improve your knowledge.

Java Application Programming Interface (API)

Once you get familiar with the basics of the language syntax and how objects work in Java, you will probably want to start putting that knowledge to work building real programs. Unlike languages such as C and C++, a library of classes and procedures, called an Application Programming Interface (API), is built-in to the Java language. The Java API is extremely powerful because the objects and methods it contains simplifies the use of complex features, such as network communication, database access, and file input/output (I/O). The API makes you more productive and a great way to become familiar with it is to browse the documentation online at Sun’s Java website or download the documentation. If you learn best by example, then Patrick Chan, Rosanna Lee, and Douglas Kramer have written several books which augment the API documentation with example code using each class in the API. You can buy volume 1 or volume 2 online or download the example code for volume 1 or for volume 2.

Free weekly newsletter

Fill out your e-mail address to receive our newsletter!

Software Engineering

Think of software engineering as all of the best practices associated with writing code and building programs that are efficient and work well, regardless of the programming language. If you already have some work experience with programming in another language, then you have probably been exposed to some of these ideas. One element of software engineering is data structures and algorithms. Sometimes you write a program that works well when you test it under simple conditions or with small datasets, but does not run efficiently under real-world industrial conditions or large datasets. This might mean that you need to modify the data structures or algorithms used by your program. Check out the Sun tutorial on using the Collections API for a good introduction to the topic. Another element of software engineering is learning to identify and use design patterns. Design patterns are coding templates and conventions which recur in many of the problems faced by programmers on a daily basis.

What Else Is There?

Check out the companion article, “Java For Newbies, A GIS Perspective” for a quick description of the important features of Java and how these will make an impact in the GIS industry. You can also send me email if you have any other Java and GIS features that you would like to see.

Photo of author
About the author
Caitlin Dempsey
Caitlin Dempsey is the editor of Geography Realm and holds a master's degree in Geography from UCLA as well as a Master of Library and Information Science (MLIS) from SJSU.