Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Hot answers tagged

2

This expression: max(CS1,CS2,CS3,CS4,CS5,CS6,CS7,CS8) will return highest CS value. Put that expression into a new field, let's call it max_CS. Make sure the new field has as many decimal places as your CS fields (if the CS fields have different numbers of decimal places, use the highest number). This expression uses nested if() functions to find the name ...


2

The quickest way to answer your question (imho) : a good SQL query using QGIS DB Manager. You choose Database / Database Manager / Database Manager then Virtual Layers / Qgis Layers and you can then try the following query (you open the SQL window by clicking on the 'wrench' icon) : SELECT LU.type, sum(st_area(st_intersection(LU.geometry,FLO.geometry)) ...


1

You can use re module, see How to extract numbers from a string in Python? Example: import re a = "Other deciduous trees with 11- 25% impervious cover" def giveintegers(data): if 'cover' in data: integers = [int(s) for s in re.findall(r'\b\d+\b', data)] return integers giveintegers(a) [11, 25] giveintegers(a)[0] 11 giveintegers(a)[1] ...


1

You haven’t posted the rest of your field calculator. But you code block looks OK. Some minor changes below may help, and you would need an expression some thing like this (assuming a field name of ‘text’): EXPRESSION: reclass(!text!) CODE BLOCK: def reclass(C_TEXT): if "cover" in C_TEXT.lower(): return 10 return None The last line isn’...


1

There are various ways that this could be tackled, quite a simple way would be to use the Vector - Geoprocessing tools - Clip to create a new layer with just the areas of land-use that are within the flood area. Layers need to be in the same CRS. You could then use Vector - Geoprocessing - Dissolve to dissolve each land-use types into single polygons ...


Only top voted, non community-wiki answers of a minimum length are eligible