What are the Top Programming Languages in the GIS World?
Every now and again we hear about the importance of programming for Geographic Information Systems(GIS) professionals, that is quickly becoming a key in the evolution of one’s career. It is argued that even the ones that have a limited grasp of programming can see the benefits.
This article is addressed to a larger audience of GIS professionals who are not only already familiar with programming, but are for those interested in getting a head start or further their knowledge.
Why would these be useful?
Programming is used with many goals in mind, whether it is automating geoprocessing tasks or implementing an algorithm for all sorts of tasks, programming goes a long way in problem solving. It helps us tackle those tasks which require a different degree of operations, where the problems we are facing need some specific manipulation that is not provided.
This is one of the reasons why many GIS software allow access to API for customizing the application according to your specific needs.
How will this go? We will start by exploring what are the most used programming languages in the industry. Then we will look at each separately to see where it is most useful and why. Lastly, we shall see what are the most notable examples of its usage.
Python
Whenever I think about GIS programming, Python comes to my mind.
My experience tells me that QGIS, and especially, ArcGIS users have heard about the modules for scripting in Python. With that being said, Python has become one of the most important languages used in the field. How so? It is easy to learn, thanks to having an outstanding documentation and easy to pickup syntax, plus the variety of tutorials available online for free. Moreover, there is a great support for data analysis and processing through the likes of Numpy or Pandas.
Python is incorporated into ArcGIS, QGIS, GRASS GIS, gvSIG, and many other open source projects, that make the language worth knowing. At the same time, there are quite a few libraries Shapely, Fiona and Rasterio, Folium, and many others that appeared in the past couple of years.
Python can be compared to as the swiss army knife for GIS.
JavaScript
Without a doubt, JavaScript is one of the core languages of the web. Being present in pretty much every browser, website or web application, this makes it a reasonable choice for development of web mapping applications. Think about it, the most popular applications in the past few years appeared, thanks to the capabilities of this language.
Notable examples: ArcGIS Web APIs, MapBox, CARTO, Google Maps API, OpenLayers, Leaflet, the list can go on.
What is becoming more obvious these days is the tendency for applications to offer more 3D web-based capabilities. And you guessed it, JavaScript comes to the rescue. Just have a look at CesiumJS (Do you have a link for CesiumJS), OSM Buildings project, and MapBox GL supports 3D visualization.
It’s pretty safe to say if you are considering web mapping, webGIS or even 3D, then make sure you add JavaScript to your toolbox. The upcoming years are looking favorable to this programming language.
R
The language for statistical computing, graphics, data science, and geospatial analysis.
It’s becoming more popular in geospatial realm through the initiative (link is confusing, with how you are trying to connect it to your article, try explaining it more to the audience) of developers from the R community. As we recently saw that ESRI decided to provide support R in their ArcGIS suite. We can interpret this as a pretty clear sign that things will only get better for R geospatial community.
You can also get R in QGIS as well, so no more worries that you’ll have to run your scripts elsewhere. Thanks to this there are pretty good signs that R will play an important role in the years to come.
Notable examples: rgdal, rgeos, ggplot2, ggmap, leaflet for R. You can find a comprehensive list on the R-project’s website.
SQL
Do you remember those introductory courses in GIS where you had to find attributes or location? This is where you might have had to input a query that is written in SQL. It’s one of the languages with a long history in GIS, that is being incorporated in many applications. You can have look at OpenStreetMap’s database overview in case you want to know more.
To sum up, SQL is essential in GIS as you will find yourself working with geospatial databases and can help you manipulate databases.
Notable examples: ArcGIS, PostGIS, CARTO, QGIS, MapInfo, and many other GIS software.
More heavy-weight languages
The languages we mentioned so far are probably the most practical from the point of learning and getting quick results. The ones that follow are the ones we might call as “heavy-weight” as they are generally found as the backbone of larger GIS software.
Java
Surely if you ever heard of Java, you probably heard about it being used in enterprises, and in various industries. But why here?
Java is used when you develop the backbone of the application, especially for desktop applications as an alternative to C/C++ or C#. Nonetheless, Java has proven itself as a particularly useful language even for map servers. As you might have known or not, one of the most popular web map server, GeoServer is written in Java.
While, more verbose and not as practical as Python, it is a general purpose programming that can help you go the long way in software development. Keep in mind, it is one of the most popular languages used today with strong and well-tested APIs, huge code base, so it’s not going to go anytime soon.
Notable examples: GeoServer, GeoTools, ArcGIS Runtime SDK, gvSIG, OpenJump, uDig, WhiteBox (GAT), Java Topology Suite etc. Last but not least, Android apps are most of the time built with Java, thus you’d have to know it if you want to go in that direction.
C/C++
One of the most well-known languages among developers, and useful for desktop applications. Whether it was for Windows or Linux, C++ has a long line of successful applications it supported and still does. I included C alongside C++ since the examples provided don’t necessarily rely fully on one or the other.
If the software was built-in the ‘90s or early 2000, then it is more than likely that it was built with C++.
Notable examples: ArcGIS, QGIS, SAGA GIS, GRASS GIS, MapServer, ILWIS, Mapnik, GDAL, Orfeo Toolbox, and the list goes on. Even today it still remains a popular language among developers, however it is not the sort of language you use on a general daily basis as a GIS user.
C#
Microsoft’s baby. Together with .NET, it represents a well-known framework for software development. You could have heard of it without actually being a coder as with most things mentioned in this article. It is popular among proprietary software companies, especially for ESRI.
Notable examples: ArcGIS (ArcObjects), ArcGIS Runtime SDK .NET, NetTopologySuite, MapWindow.
Let’s sum up the whole thing
The easiest way to find out what languages are being used in a scenario is to regularly check out the Open Source Geospatial Foundation (OSGeo). After that, ESRI provides information about what they work with. Just follow their blogs, webinars, open source projects, conference presentations, the same applies to other companies. What I also suggest is following popular GIS websites and specialized magazines. There are so many ways you can tackle this if you are interested.
Keep in mind that a software is most of the time built with multiple technologies but in general a few of them had the most influence as you can see below in QGIS’s case.
Source: from QGIS GitHub repository (as of November 2, 2016)
There are plenty of languages we didn’t include as they do not come as close as the ones mentioned before, nevertheless there some very interesting mentions: Ruby (RGeo library), PHP (GeoPHP).
Before going, we would like to show you a summary of the various programming languages that are connected to the variety of technology that is summed up in the article:
-
- GIS Scripting and applications (Python, R)
- Data processing, analysis, and modeling (Python, R)
- Web Mapping (JavaScript, Python)
- Geospatial databases (SQL)
- MapServers (Java, C# .NET, C++)
- GIS heavy-weight development (Java, C/C++, C#)
- Mobile development (Android, iOS, JavaScript)
- Geospatial libraries (JavaScript, Python, Java, R, C/C++)
All in all, if you want to have a bigger view of what programming languages are being used for specific GIS software, we suggest that you have a look here.
Very informative. Thank you.
I’m glad you enjoyed it!
Nice article. It’s always good to take a pause at the end of the year and wonder where the languages stand for optimal use in various cases. But there is an omission I’d love to bring to your attention. In the Javascript world, there is a visualization library that goes by the name of D3 that falls square into the mapping space.
http://bl.ocks.org/mortenjohs/4739921
The best part is that many of the D3 library’s applications can be used without a connection to the internet. If you’re interested in more of its examples, check it out at https://d3js.org/
Totally agree with you Brian. I was aware of D3 and I should have mentioned it. At that point I didn’t want to enumerate too many of them though. Indeed, I would even say that it would be worth writing an article that covers D3 in map making with short intro and pointing to the most impressive examples out there (although I assume there’s a lot of them).
Thanks a lot for sharing your thoughts!
I am using using C & C++ programming language in my application which is based on the current location of the user. Till now I didn’t face any major issue as such.
Thanks sir, I have studied maths and geography during my graduation and now learning python. Could you help me to guide in which segment I could explore where i can contribute to changing environment conditions. Global warming etc.