Bug report #12713
when columns have the same name, styling with the first one does not work
|Affected QGIS version:||3.0.0||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||20819|
seems impossible to thematize on the basis of the ``Calculated`` column.
If saved as a new shapefile, it is OK. Possibly SAGA produces a wrong dbf?
#3 Updated by Giovanni Manghi over 5 years ago
- Affected QGIS version changed from 2.8.1 to master
- Status changed from Open to Feedback
- Category changed from Processing/SAGA to Vectors
- Subject changed from Shp cannot be stylized to shapefile cannot be stylized when columns have the same name
There are two issues here, but the real one seems a qgis issue.
The SAGA module gridstatisticsforpolygons creates an output shapefile where the statistics are placed into columns that are called "nameoftheinputraster [nameofthestatistics]" and this is very likely to hit the 10 char limit for column names. So the result is likely to have different columns that have the exactly same name (the first 10 chars of input raster), and this is confirmed by ogrinfo of course.
When opening a shapefile with at least two columns with the exact same name, ex: "columnname", qgis "changes" the name of the 2nd, 3rd... to "columnname_1", "columnname_2", etc. Styling using the values for this "renamed" columns works, but not for the first one.