Geographic Information Systems Asked by RClov on December 11, 2020
I am using QGIS 2.18, and I am looking for a way to change default values of the Merge Selected Entities
algorithm.
To make it short, I have in my shape file buildings that are divided in several small parts (whereas it should not), and I would like to merge those part to get back a single building. However, one of my attributes is the height, and the default value of the merging algorithm is to pick one height among the merged entity, whereas I would like it to be always the maximum (I have quite a lot of buildings to fuse and I would like to avoid changing parameters every time I need to merge entities). Is there a way to change this through some files?
I honestly do not know how to change the way software works. Instead, I'd suggest to add a new field which represents the maximum height of each building.
QGIS 2.18 has aggregate
functions and one of the functions maximum()
is useful for this case.
Below is a small test example:
bldg_id
is 1001) and Green building (bldg_id
is 1234).Create a new field with an expression maximum("height", group_by:= "bldg_id")
Then the new field (max_H
in this example) will represent the tallest height of the building parts.
After merging, just use this newly created field (e.g. max_H
here).
Answered by Kazuhito on December 11, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP