Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when columns have the same name, styling with the first one does not work #20819

Closed
qgib opened this issue May 7, 2015 · 11 comments
Closed

when columns have the same name, styling with the first one does not work #20819

qgib opened this issue May 7, 2015 · 11 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Feedback Waiting on the submitter for answers stale Uh oh! Seems this work is abandoned, and the PR is about to close. Vectors Related to general vector layer handling (not specific data formats)

Comments

@qgib
Copy link
Contributor

qgib commented May 7, 2015

Author Name: Paolo Cavallini (@pcav)
Original Redmine Issue: 12713
Affected QGIS version: 3.0.0
Redmine category:vectors


new description:

#20819 (comment)

old description:

This file:
http://www.faunalia.eu/~paolo/qgis/result.zip
resulting from
processing.runalg("saga:gridstatisticsforpolygons","/tmp/RESULT.tif","/path/municipalities.shp",False,False,True,False,True,False,False,False,0,None)
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?

@qgib
Copy link
Contributor Author

qgib commented May 9, 2015

Author Name: Even Rouault (@rouault)


Examination with ogrinfo shows that there are in fact 2 columns with same name "Calculated" (and with different values), which must confuse QGIS.

@qgib
Copy link
Contributor Author

qgib commented May 10, 2015

Author Name: Paolo Cavallini (@pcav)


Merci Even for checking. So this should be either an issue of Processing, not giving appropriate column names, or upstream (saga).


  • fixed_version_id was configured as Future Release - High Priority
  • category_id was changed from Symbology to Processing/SAGA

@qgib
Copy link
Contributor Author

qgib commented May 11, 2015

Author Name: Giovanni Manghi (@gioman)


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.


  • version was changed from 2.8.1 to master
  • status_id was changed from Open to Feedback
  • category_id was changed from Processing/SAGA to Vectors
  • subject was changed from Shp cannot be stylized to shapefile cannot be stylized when columns have the same name

@qgib
Copy link
Contributor Author

qgib commented May 22, 2015

Author Name: Giovanni Manghi (@gioman)


  • status_id was changed from Feedback to Open

@qgib
Copy link
Contributor Author

qgib commented May 29, 2015

Author Name: Giovanni Manghi (@gioman)


  • subject was changed from shapefile cannot be stylized when columns have the same name to when columns have the same name, styling with the first one does not work

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • regression was configured as 0
  • easy_fix was configured as 0

@qgib
Copy link
Contributor Author

qgib commented Aug 7, 2017

Author Name: Jürgen Fischer (@jef-n)


  • description was changed from new description:

https://issues.qgis.org/issues/12713#note-3

old description:

This file:
http://www.faunalia.eu/~paolo/qgis/result.zip
resulting from
processing.runalg("saga:gridstatisticsforpolygons","/tmp/RESULT.tif","/path/municipalities.shp",False,False,True,False,True,False,False,False,0,None)
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? to new description:

#20819 (comment)

old description:

This file:
http://www.faunalia.eu/~paolo/qgis/result.zip
resulting from
processing.runalg("saga:gridstatisticsforpolygons","/tmp/RESULT.tif","/path/municipalities.shp",False,False,True,False,True,False,False,False,0,None)
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?

@qgib
Copy link
Contributor Author

qgib commented Mar 7, 2018

Author Name: Paolo Cavallini (@pcav)


Still true in QGIS 3.


  • version was changed from master to 3.0.0

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats) labels May 25, 2019
@qgib qgib added this to the Future Release - High Priority milestone May 25, 2019
@Pedro-Murteira
Copy link

@pcav Hello, the link to the file is unreachable. Did you by any chance come across this issue in the more recent versions of QGIS?

@gioman gioman added the Feedback Waiting on the submitter for answers label Feb 28, 2022
@github-actions
Copy link

The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale".
If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue.
In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue.
If there is no further activity on this issue, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Mar 15, 2022
@github-actions
Copy link

While we hate to see this happen, this issue has been automatically closed because it has not had any activity in the last 42 days despite being marked as feedback. If this issue should be reconsidered, please follow the guidelines in the previous comment and reopen this issue.
Or, if you have any further questions, there are also further support channels that can help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Feedback Waiting on the submitter for answers stale Uh oh! Seems this work is abandoned, and the PR is about to close. Vectors Related to general vector layer handling (not specific data formats)
Projects
None yet
Development

No branches or pull requests

3 participants