Geographic Information Systems Asked by Kripson on January 19, 2021
I have two different layers containing different polygons and I need to combine them to see the differences over time.
So the output has to be a layer containing the attribute of interest of layer one, the attribute of interest of layer two and the attribute of the change (example : entity 1 – entity 2 OR entity 1 – entity 1 IN THE CASE OF NO CHANGE)
How can I do that using QGIS?
You can try with the geoprocessing command vector > geoprocessing tools > union
.
See https://grindgis.com/software/qgis/basic-editing-tools-in-qgis
For your purpose, the column with the attribute can be called 'before' in the first layer and 'after' in the second layer, or something similar. I think the result will be what you're looking for.
Answered by jberrio on January 19, 2021
As mentioned above, the Union tool in QGIS will solve the problem. As per the documentation:
An Overlay layer can also be used, in which case features from each layer are split at their overlap with features from the other one, creating a layer containing all the portions from both Input and Overlay layers. The attribute table of the Union layer is filled with attribute values from the respective original layer for non-overlapping features, and attribute values from both layers for overlapping features.
The key there, being 'attribute values from both layers for overlapping features'.
once you have your overlapping features and attribute values, you can create a new calculated field, which is simply att1 - att2. this will be your 'difference' field.
You can create this field by going into your union output dataset (maybe save it as something appropriate first, shapefile/geopackage, whatever your fancy). then right click > Properties > Fields > Field Calculator (the little abacus button).
Answered by nr_aus on January 19, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP