Plugin Showcase: Evaluation Maps Converter

Plugin Showcase

Geodesignhub follows Python’s premise of “batteries included”. What it really means is to have a rich, standard functionality that can be utilized without having to download packages or installing software or worrying about software licenses, technical skills etc. This gives Geodesignhub a head start in many projects because the focus is on the problem at hand and not software requirements or technical skills, licensing etc. To that end, we have built and maintained a extensive set of plugins and tools. Plugin Showcase is a series of posts that I plan to write over 2019 to introduce and showcase the different plugins that are available in Geodesignhub today for your projects.

Building Site Assessments

In this article, I will talk about a tool that we have built and use internally to help with processing the evaluation map, once it is built. Do you check vector geo-data files for attributes or schemas etc? Do you work with vector data where you need to check the performance of geospatial operations? Do simplify vector features? If so read on, this is open source so you can use and customize it to speed up your work.

What is a evaluation map?

A evaluation map in Geodesignhub is an assessment of a study area in simple red / yellow / green colors to help you in developing a understanding of the problem at hand. When you think about the future of a place, you will need to make decisions based on science and available data. In Geodesignhub, however, the data does not drive the decision making: it helps in providing guidance. The knowledge and values of the stakeholders and the subsequent negotiations form the basis of decision making. Lets take a example:

This is a map of Green Infrastructure of area in Kuala Lumpur where the areas in red mean that Green Infrastructure already exists and is working well. Yellow are areas which are unsuitable for Green Infrastructure perhaps because there are water bodies present. The green areas are where green infrastructure could be expanded in the future. This map was built by our free and open source automatic map generation tools using open data, more on that some other time. These maps can also be built by drawing by hand (using personal knowledge) or by using GIS software if you know how to use it.

The problem

In some of our projects, our partners and others build these maps using desktop GIS software. They then try to upload the file in Geodesignhub, however they need to be checked whether they are in the correct format and have the correct attributes. I had to do this by manually opening up the file in QGIS, checking the attribute table and maybe re-projecting the file and sometimes simplifying it. It is a time consuming activity so I built a tool to help automate this. Lets take a look at it.

Evaluation Maps Converter

This is a MIT licensed open source software software that I started to write three years ago! At a very high level, once a evaluation map is built and uploaded, the software takes the file and data through a series of processes:

  1. Check if the file is valid

  2. Check the attribute table to see if it has valid attributes

  3. Reprojects the file to EPSG:3857 projection if it is not in that already

  4. Simplifies features using the Douglas-Peucker algorithm

  5. Covert to GeoJSON

  1. Checks performance by generating random features and performing intersections to ensure that the file is responsive in a web-environment and report on all these tests

  1. Make the GeoJSON for download that can be directly uploaded in your Geodesignhub project

Geodesignhub has upto ten of these files and doing this for each of them used to take about 2-4 hours (sometimes more) and now we use this tool extensively to go through the ten files in less than 30 minutes! All of this can be done without installing any GIS software.

Technical Details

This is a Flask based webapp that uses a number of geospatial libraries: Shapely and Fiona for e.g and you can take a look at the codebase, run a instance on your infrastructure and even contribute to it using Github. Also, given our commitment open geodesign means that it only supports the OGC GeoPackage format for the evaluation map.

About Geodesignhub plugins

Geodesignhub provides a very extensive API where everything in the software can be taken out for use with other tools. All plugins including the one above use this API to export data out of Geodesignhub. This enables us to provide “one-click” integration with Geodesignhub, so you can focus on the problem at hand rather than software. If you have the skills and resources to use commercial 3D software of course you are welcome to use them, all the data is available for you!