I generated a bounding box by calculating the extent of each feature using "Polygon from layer extent..." tool located in "Vector/Research Tools" which works great but I lost the fields, especially the name of each polygon. Does anyone know how to keep the fields in the process?
After generating a bounding box from the polygon layer, you can use Join attributes by location to copy the information of the original polygon to the newly created polygon extent. Go to
Processing toolbox -> QGIS geoalgorithms -> Join attributes by location.
In the following example, I have a polygon (cyan color) and I generated a polygon extent (light brown color), and the attributes are shown in the image below:
Using Join attributes by location:
- Target polygon: Polygon extent
- Join vector layer: The original
- polygon Geometric predicate: intersects
Here is the output: