This repository contains the data, information and code about the content of the "GMT 456 GIS Programming" course offered at the Geomatics Engineering Dept. of Hacettepe University, Turkey.
The developed code is based on Python as it allows to further extend into a QGIS plugin.
- Object oriented programming - A Recap
- Function Calls – pass by reference vs pass by value
- Signal- Slot
- Graph Data Structure
- Adjacency Matrix
- Disjoint Sets
- Minimum Spanning Tree (MST)
- Kruskal's Algorithm
- Prim's Algorithm
- Building a QGIS Plugin
- Import the polygon shapefile into PostGIS
- Create the centroids table
- gid (geometry_id) - serial
- name - varchar(40)
- geom (geometry) - geometry(point,SRID)
- Populate the centroids table (st_centroid)
- Create the edges table
- gid (geometry_id) - serial
- origin - text
- destination - text
- cost (weight) - float
- geom (geometry) - geometry(LineString, SRID)
- origin_gid - integer
- destination_gid - integer
- Populate the edges table (st_intersects)
The MST of Turkish cities is found by using the Kruskal's algorithm which is implemented in Python (previously shared on Twitter):
The aim of this project is to integrate all the process into a QGIS plugin such that whenever the user inputs a shp file, the MST is provided back.