Digital Geography

How to build your own QGIS plugin

Since I’ve created the QGIS plugin qgis2leaf I was surprised how easy it is to create a plugin for QGIS. In this post I would like to show you how to build a basic buffer-plugin and give some tips for debugging and developing. the plugin template QGIS plugins are competely build in Python: the UI can be designed with QT designer using PyQT. The whole logic of the plugin needs to be written in Python as well. But lets be honest: It would be great if you would have  a starting point. In QGIS there is a plugin for this called…

Sublime 3 – YOU want this editor!

Let’s face it: being a geoscientist and writing code goes hand in hand in recent times. Most programs have their own code editor like MatLab with its m-file generator or R with its handy version of RStudio. But when it comes to webmapping and direct code writing in an open environment you are mostly sticked to a certain editor which has some syntax higlighting and maybe a syntax checker like Notepad++, kate or textwrangler.

Anaconda: a interesting Python distribution

When working with GIS and statistical data there is an emerging need to know some scripting language. Python is one of the most widely used. It is not perfect but it is like a geographer: fairly good at nearly everything: “For scientific purposes, when writing a small specialized script, Python may often be the second best choice: for linear algebra, Matlab may have nicer syntax; for statistics, R is probably nicer; for heavy regular expression usage, Perl (ugh) might still be nicer; if you want speed, Fortran or C(++) may be a better choice. To design a webpage; perhaps you…

NeoCartography and the need to code

The time when I studied Geography and Mathematics is long ago. So I chose Cartography as one major part of my studies and learned to draw circles and a good cartographic representation of discrete values as an example. As I have chosen this field of cartography and GIS I am well aware of the changes that came to this fields. Especially Cartography made big leaps to be more represented by Geoinformatics than those traditional map makers. And I would assume that it is hard for Geographers and Cartographers to catch up with all those fancy programming stuff. Nevertheless I think…

D3-Basics – All you need is a selection!

Since a while I am programming with the JavaScript library D3.js … and … I am addicted to it! As I would like to present some tutorials on D3’s fantastic possibilities to create and design webmapping solutions … I think it would be good to give you a description on the things that I would identify as elementary. Caution! This tutorial could be a little bit too detailled for you, when you are a skilled JavaScript programmer! I am sorry for that! But when you are a noob in JavaScript, as I was when I began to program with D3,…

Python for Geospatial Data Analysis (Part II)

Reading Geospatial Files In the last post in this thread I provided a bit of background and some simple instructions for installing python and the necessary modules for geospatial analysis. In this post I will cover some basic python syntax and reading raster data from a geospatial file. Let’s get started. Python files typically end in the extension .py. In a OSX/Linux environment, the first line in your file should be the interpreter you want to use. On my macbook, my python executable is /opt/local/bin/python, so the first line of my file is After this, you need to load the…

Python for Geospatial Data Analysis (Part I)

For my first post on digital-geography.com I wanted to begin a discussion on a topic I have strong feelings about, Python. A common question I get from students and experienced colleagues is “What analysis environment do you use?”. Where I work most people use either IDL/Envi or Matlab for raster data analysis. These are good packages, with many advanced capabilities, but they can be restrictive. IDL or Matlab code can be difficult to move from system to system or share with others because both environments require licenses that can be quite expensive. That is particularly a problem if you are…

importing shapefiles in Python

Python is a very common scripting language which seems like a swiss knife for programming. This is the reason to use it as a framework for the program “where are your customers“. In this context I need to import the shapefile into Python. Therefore the guys at geospatialpython present a nice module to import shapefiles into python. First install the file using easy-install/pip. Therefore open the terminal:

Python Programming in ArcGIS

Python is one of my favourite sripting languages as it is easy to learn and something like a swiss knife in programming to me. you can find a lot applications which use Python in some way (good example may be chandler. To use this in your GIS-applictaions I would like to share a site with you that is hosted by the Penn State University: GIS Programming and Automation I will probably come up with a video-playlist for those examples. Someone out there to help me?