Orientation with Kojo Idrissa
Published October 26, 2026
This video features Samweli Mwakisambwe at DjangoCon US 2024 in Durham, North Carolina, USA.
The talk will provide an overview of the available Python related geospatial tools that can be used to analyze location data highlighting the possibilities and the potential of this attendees will be able to grasp what tools they can use to access particular location data.
Among the available python geospatial tools we will discuss the main and most used in accessing location data types raster and vector, we will have a look at how these base tools can be used to access the types and their benefits.
We will then dive into one of the tools called QGIS and use it as an exemplar of how we can now interact, analyze, and visualize geospatial data in Python. A step-by-step guide on how to import and use QGIS features in Python.
QGIS is a freely downloadable open-source GIS software suite that contains a desktop option, mobile, and web components. QGIS version 3.14 was released with a Temporal Controller an interesting feature that allows immersive and creative visualization of time-based geospatial data.
Then we will see how QGIS can be used inside Django as a package. Showing how to achieve a link between the two tools.
At the end of the talk attendees should expect to have a comprehensive understanding of different Python geospatial tools, whether you are a developer or a professional learning new ways of technology, this talk will equip you with the knowledge on the right geospatial tools.
This talk was presented at: https://2024.djangocon.us/
LINKS:
Follow Samweli Mwakisambwe 👇
On X: https://x.com/
Website: https://samweli.github.io/
Samweli Mwakisambwe outlines the open-source Python ecosystem for working with geospatial data, beginning with related services such as PostgreSQL/PostGIS, GeoServer, GeoNode, QGIS, GDAL, Leaflet, and OpenLayers. He focuses on Rasterio for reading and writing raster data, GeoPandas for working with multiple geospatial formats and producing plots, and QGIS for creating, editing, publishing, and visualising maps, including through its Python bindings and temporal controller. He explains that these tools can be combined in Django, alongside GeoDjango, and describes a real project where QGIS processing logic was moved from a desktop plugin into a Django API so it could run on a better-equipped remote server. He argues that the tools are practical and complementary, while noting that QGIS–Django integration is still under-documented and that GeoDjango could improve its support for the range of geospatial formats available through GDAL.
Summarised automatically from the transcript.
Rasterio is a Python package for accessing, reading, writing, and updating geospatial raster data. It can also be used with plotting tools to display raster datasets and color schemes such as NDVI.
Discussed at 5:46Rasterio is focused on geospatial raster data, while GeoPandas works with a broader range of geospatial data formats and can plot vector datasets such as city boroughs.
Discussed at 7:17Yes. QGIS is a desktop application for creating, editing, and publishing maps, but its Python bindings also allow it to be used inside Python applications, including through Conda.
Discussed at 8:48Django supports geospatial applications through GeoDjango, and packages such as QGIS, GeoPandas, and pandas can also be installed and used inside a Django application.
Discussed at 12:42The main challenge was the lack of documentation and examples for the integration. Once QGIS was available through Conda, it could be used like another Python package, with some additional application configuration.
Discussed at 13:40They exposed the existing QGIS-based land and land-cover-change processing through a Django API, installing QGIS as a Python package on the backend. This let users access the processing on a remote server instead of needing sufficient resources on their own computers, while reusing most of the existing QGIS logic.
Discussed at 15:43GeoDjango provides Django’s main support for geospatial applications and is considered a good framework for handling geospatial data. The speaker notes that it could still improve its format support compared with QGIS’s dependency on GDAL.
Discussed at 18:09Automatically transcribed, so expect mistakes in names and technical terms.
Samweli Mwakisambwe
Oh, thank you. In this talk we are going to Take a look and I'm going to present and show you the available Python open source tools that you could use to visualize and analyze geospartial data. We are also going to look at the different tools that you could use with different geospatial data because there's a lot of types of geospatial data. So we are also going to take a peek at that. My name is Samweli Mwakisambwe. I'm from Dareslam, Tanzania. I'm a software developer at Katoza. Katoza is a South African Technology company
that provides training, maintenance, and development of geospatial services. I'm also a QGIS core and QGIS Python developer. I'll touch more about QGIS at some point later. The following are the topics that we are going to cover. We are going to look at the world geospatial ecosystem. the number of services that are available and just an introduction on what you should be aware with when you are starting to deal with geospatial data, especially for those who are not familiar or haven't worked before with geospatial data. Then we are going to
dive into our main context for the talk, which is the Python open source tools. We're going to look at the lange of the range list of the of the of the available python open source tools we're just gonna select A few of them because there's a the risk is huge, but we're just gonna select a few of them and then we're gonna take a look at how they work. Then we're gonna have few examples. So we just can have visual examples. I was planning to have some live coding, but my other computer didn't work So we're just gonna have some examples and then in the end of the talk I'm gonna share my resources.
You can visit them later and then you can see how those examples actually work And then at last we're going to touch a bit about how all these open source tools slash packages can be used inside Django and the current support of geospatial data inside Django. Now the ecosystem. There's a number of services, That are available that you could start using with the geospatial data. And notably these are open source services I've mentioned a few of them there, but
if you if you take a look at the world ecosystem, there's a very huge number of available services and tools that are enabling the storage and management and then the access and the visualization of all at the top there you can see we have Postgres SQL, which is the database for the location data. And then alongside you have PostGIS, which is an extension to the PostGS database. It has a lot of functionality, a lot of ability to deal with the location data and the your special data inside Postbus and then you have GeoServer which is the tool used for sharing and publishing
Geographical information. You also have Geonaud, which is a content manager for the geospatial data. And then you have QJS and GDAO, which are working hand in hand to enable users to be able to create maps, edit maps, and publish maps, time maps. And then you have leaflet and open layers, which is just a few a few examples of their variables. Libraries are responsible for visualizing geospartial Now the open source tools for Python that are available for
visualizing and analyzing and doing analysis for the for the for the geospatial data. As I mentioned, the list is very huge, but for this talk we're gonna focus On Raster. io, GeoPanda, and QGIS. I'm gonna touch a bit about what is Rasterio. And when can you use LastRio? And then we're gonna look at the same questions for the GeoPanda and then for QGIS We're going to leave other libraries and tools. So there's pandas, there's sheprey, there's pottery, there's
Really there's NAMP which is multipurpose but it's also used in geospatial data. I'm going to include them in the resource for this presentation and then you can have a look at your own time. So raster IO. Raster IO is a Python package that is used to lead and write geospatialized data. So the main purpose of Rasterio is for interacting and accessing and writing updating the rest of that and its
use case is very simple you just install it as a package and then you import it and use it in your in your application The example there is Rasrayo is reading a T file and plotting it on a on a on a On the canvas. The other examples that you can see on the left there is that the last IO is has been able also to read the teeth But with the with the help of Portly, RasterI also is able to catalogize and show you different color schemes for
just partial data. So on the right there you can see that there's a NDVI which is the vegetation index that shows how healthy the vegetation is And also we have GeoPanda. So Geopanda itself Is a package that works with a variety of geospatial data formats. Compared to RasterI, which is working only with the geospatial raster data, the geopanda works with A range of rest of the geospatial data. So right there you can see that's how you can
use geo panda. So Geo dataset is a module from GeoPanda and from this example is the code is trying to show the borough of the New York City and then after that they you plot the it plots those boroughs to a to a campus so the same example also is possible to add pottery, which plotly, which is the a package for showing different visualization, showing different data inside a canvas.
So you can see there we have there's a map on the on the background and on the top there's a New York New York City Bros. Okay now visualization using QGS. So what is QGS? QGS is the desktop application that's used for the creation of geospatial data creation of maps edition of maps and the public publication of maps qjs itself is developed in c plus But it has support for Python through Python SIP bindings. So it's possible to use QGIS as a Python package inside a Python application.
It's developed at the team efforts and then it's available free to download. It's a supposed for Python as I mentioned. You could either use Python inside QJS itself as inside the desktop application, or you can Download or you can you can install QGS as the package and it's current available as a package inside the conda index On the left are the picture of the QJ's contributors from the contributor meeting. And
as you mentioned, is free to download and use and it has a number of features that that enable the visualization So this is the look of the QGIS. There are a couple of features that it enables QGIS to Stand high in the visualization and one of them is the temporal controller. So you see in one of the examples that I'll provide in my presentation, you can see that we are using the temporal controller from QGS itself. And then we are using it inside a Python application as the in looking at different weather data
This is an example of QGIS being loaded as a as a package in a Python application. From the left there you can see there are some imports from the from the keyjs API. And then after that we are initializing the actual application. And then we are fetching data from Alaska. So you can see down there the Rastafari URI. And then we are setting up the canvas and then we are showing it to the we're adding it to the to the canvas. Yeah so this is where I wanted to show
you the visualization example. One example that I wanted to show you is the how you could use geo panda to show the public transit data that we once worked on back in direction. And then another example that I wanted to show you was How QGIS is able to fetch data as a inside a Python application. So if you just go to the resource link there, you'll find a couple of examples. And you can try it on your own. Yeah, so Django integration. So currently Django supports geospatial data
use usage via a Geojle framework. I think a couple of you might be aware of that but also as I mentioned we have QGS, we have GeoPanda, we have pandas, and all these all these Packages can be installed and used as Python packages inside Django. So that's it
Speaker 2
Hi, thank you so much for the presentation. I have a very simple question. What's your biggest challenge that you've had when integrating Django with QGIS? And the second part is Okay, let me let you answer the first question.
Samweli Mwakisambwe
Yeah, I think the biggest challenge For me it was the so this the first time when I was trying to use Django with QGIS, there was no much resource out that I could lookup it was like I'm the first in the area kind of moment and that because there's no so much documentation about the process and there's the awareness is a bit low. But you know as doing this presentation is one part of the of the aim, you know, try to get the odd out there that it's possible. And if people have any issues, they know where to go and what to reach out. So that's the main challenge. But after figuring out how like QGS is available in Conda, I can use
as just another python package there's just some few configuration that I need to do you know and not in conda in how you set up the application itself yeah
Speaker 3
Thank you, Samueli. Can you say a little bit more about your own work or the company's work or your hobby projects that and the kind of insights that you're getting from through Django and GIS.
Samweli Mwakisambwe
Yeah. I think so asin catals are heavily using QGIS and We have been exposed mostly in geospatial data and trying to do analysis with geospatial data. visual and geospatial data almost every day. And one of the beautiful experiences that I had with the Django is that we We're working with this Python application QGS plugin we can call that allows processing of analysis of land or land cover changes. So we are doing this on QGIS
and then at some point we got this challenge that You know, some people might use this Python application inside their computer and they didn't have enough, let's say, resources. So we need this to move this to a remote server so they can just go there and access it. with where we have a lot of resources. So that's when we Django came in the press because instead of there's no there's no way you could post qjs in a remote server as a you know as a web application. So what we did is we created an API using Django and inside that API, Django API, inside that Django application We installed QJS as a Python package.
And we didn't have a lot of work because of rewriting the logic because the main Python application already had qjs logic. So we just ported that qjs logic from the desktop to the back end I mean I think that saved us a lot of work and that's because we we've been able to figure out the integration between QGIS and in general. But we are we are doing a lot of work. We are we also have a plugin that work on identify women discrimination that use geopanda, Rasta. io and QGIS
all together. And something that I 'll add to the presentation resources so people can have a peek and look. It has a lot of cool visualization. And yeah we are working a lot of awesome projects. The temporal controller, the feature that enables QGS visualization is the work that was done at Catoza together with Northrod and other stakeholders. Yeah Thank you. Okay.
Speaker 4
I have a question. Do you find any advantages of using Geo Django when you're using but More in the in the sense of the admin or how to handle the geospatial data?
Samweli Mwakisambwe
Yeah, yeah, I think I think it's it's one it's it's a good framework. Because currently there's I don't think there's any other support for just partial application inside Django unless otherwise you use Geo Django. Yeah so I think I think it's it's very good. I didn't have any change only thing that there's just a couple of improvement that need to happen. The way that you know the for example for QGS, QGS is dependent on JDA, which is a an abstraction library and has a almost all formats for GeoSparad, which is not the same for GeoJango. But it's it's something that you know GeoJango can improve upon.
So that's the I think that's the only challenge that I had. Have I answered your question? Yeah, yeah, yeah. Thank you.
Speaker 5
good presentation. My name is Adam from Kenya. I'm a geospecial developer. If you compare do you also use a folium for your work or you Have you ever used it? It's also a special library that I use it. How do you compare it with QGs, Py QGs? Okay
Samweli Mwakisambwe
I'm sorry, you say Odium? Folium
Speaker 5
Folium. There's a geospecial dribble called folium. Yeah.
Samweli Mwakisambwe
Yeah, I've heard about forum but and unfortunately I haven't worked with it so I can't compare it with QGIS. Is it open source Yeah.
Speaker 4
Well thank you Samwelli. Please big round of applause for Samwelli.
September 22 - 27, 2024
Durham, North Carolina, USA
Note: We understand that names change, people change, and bodies change. We respect each individual's journey and privacy. If you have any concerns about a video or need us to remove content, please don't hesitate to contact us. We will handle your request with care and promptly address any issues.
Published October 26, 2026
Published October 26, 2026
Published October 26, 2026
Published October 26, 2026
Published October 26, 2026
Published October 26, 2026