I'm a complete newb when it comes to things like Python, however I'm keen to learn more. I have some experience with ArcMap's Model Builder and have started playing around with QGIS Graphical Modeler (as we have limited licenses at my new job).

I'm trying to automate the identification of predominant land uses within subcatchments (shape file), based upon the property types i.e. predominantly detached houses, predominantly semi-detached, predominantly flats and terraced houses (this is for a hydraulic modelling application).

I've so far come up with a way to split AddressBase points based upon a house type field, into 4 separate shape files. I then plan to count the number of each type falling within each subcatchment (will result in four columns in the 'subcatchment' attribute table, with counts for each).

QGIS processing model so far... I'm now looking to identify the predominant type of property in each catchment area

Next I would like to populate a fifth column, based upon the maximum value from these four counts.

So for example:

enter image description here

Any tips on how I could implement this?

1 Answer 1


The field calculator allows you to search for maximum values using max(val1,val2,...).

So you could wrap max("Detached","Semi-detached","Terraced","Flats") in an if or case when clause. Though I think it could be done more efficient.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.