Bug #6063
Geoprocessing -> Convex hull(s): Attributes not properly handled
| Status: | New | Start Date: | 07/18/2012 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | fTools | |||
| Target version: | Version 2.0.0 | |||
| Platform: | Patch supplied: | No | ||
| Platform version: | Affected version: | master | ||
| Status info: | Causes crash or corruption: | No | ||
| Resolution: |
Description
When creating convex hulls from a point layer (.shp) based on a common attribute ("create convex hulls based on input field"), one would expect that the resulting polygon layer would at least contain this attribute in the table.
But in opposite to this, the resulting table structure is just a complete copy of the points attributes table and most of its fields are empty (of course, cause most point values differ).
Two fields get populated though, but only with strange numbers which i can't identify.
This behaviour reduces the usability of convex hull enormously, cause i planned to use them as a coverage layer for Atlas and fill the map title with the attribute from the convex hull layer without extra steps ... would all be a real time saver for 300 + x overview maps!
p.s. The closed bug #2529 is similar, but explicitly refers to postgis
pps.: just managed to retrieve my attribute in the table by deleting the first column in my point shape: Now the first column in the polygon layer represents the chosen attribute (3rd column in point layer), field name is of course still wrong.
History
Updated by Salvatore Larosa 10 months ago
Confirmed!
If "create convex hulls based on input field" is checked the tool write the values in the first three fields without changing the name!
Values are the ID, area and perimeter of the polygon!
It should create new fields!
Updated by Paolo Cavallini 9 months ago
- Target version set to Version 2.0.0
Updated by Fabian Stenzel 30 days ago
Still using Version 1.8 of QGIS (standard packages for ubuntu), I can't say if this issue is fixed by now, but I had the same problem, missing/losing the attribute I based my convex hull on.
As Salvatore mentioned, it seems that the newly created convex_hull_shape copies all fields of the old table, but overwrites the first three columns in the creation process with: convexHull_based_field(TYPE),Area(FLOAT),Perimeter(FLOAT) regardless of the types the actual first three fields have. Converting from Float to Integer or String seems to work fine, but if the first field is an Integer (what the ID field usually is) and the convex_hull was based on a String-field the content the convex-hull was based on gets lost.
Work around: use table-manager, create 3 new fields before all the others with the Types: convex_hull_based_field_type,Float,Float.