" />


Flow mapping in QGIS

Just recently I found out through a colleague of mine about a new QGIS plugin that focuses on flow mapping. The plugin is called Oursin (French for ‘urchin’) and was made by Lioinel Cacheux. It can be downloaded within QGIS or at the official repository.

This type of plugin is especially interesting to me because I have been doing a lot of this type of mapping in recent projects during my day job. For these projects which usually consist of hundreds of thousands of movements we use a combination of a custom application and postgis for analysis. We do most of the cartography in QGIS.

At first glance it looks as if this plugin will be able to substitute some of this workflow. To find out I played around a bit with some dummy data. My findings are below:


The plugin basically needs 2 inputs: a flow table and a geographic table which contains locations of begin and end nodes. The flow table consists of the following columns: Start, End and Flow(needs to be decimal NOT STRING). The geographic table contains the following columns: Geographic code, Name (for labeling, this is optional and needed by the plugin).

The confusing thing (at least at first), is that the start/end in the flow table does not have a geographic component, you need to link it to the geographic table. This then creates a new network.

Flow mapping tables

Flow table and geographic tables in QGIS


How does the plugin work?

The plugin itself however is pretty straight forward. You plug in your Flow table, make sure your flow column is set to decimal. Then you input your point layer and link up the flow table to this one using your geographic ID. You can then select to save it memory or save it as a shapefile.


Plugin window

Oursin plugin window



Your output will be a new line shapefile with the following columns: Origine, Dest, Flux (flow) and Dist_km(distance in kilometers).


Output line table

Output table



I used dummy data from my hometown, using my home and locations in my life as nodes. Using the Flux or Dist_km field you can scale the lines according to intensity. I generated this little map using several locations.


Output map


I have not been able to test the plugins with big datasets, however I’m sure I will in the future. If you have any questions feel free to post them below.


This Post Has 6 Comments

  1. Miquel schreef:

    Thank you very much for shearing this useful tool. Thanks!

  2. nilo schreef:

    how to use this plugin in a case between countries?

    • Jeroen Drewes schreef:

      You would make a centroid for the countries that you want to show. So you would have a point for every country you want to include. Then you follow the steps as shown above 🙂

  3. Eduardo schreef:

    Do you have some idea how to use this plugin within roads, waterways and railways network?

    • Jeroen Drewes schreef:

      Hello Eduardo,

      I don’t think it is useful for this application, you would likely want to use something more advanced like PGRouting.

  4. ADIL schreef:

    Good Morning.

    I wonder, how you define the flow and fowdecima value in the Flow attribute table.

    Thank you.

Leave A Reply

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you agree to these settings.