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

Loading styles issue #15531

Closed
qgib opened this issue Aug 17, 2012 · 5 comments
Closed

Loading styles issue #15531

qgib opened this issue Aug 17, 2012 · 5 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Symbology Related to vector layer symbology or renderers

Comments

@qgib
Copy link
Contributor

qgib commented Aug 17, 2012

Author Name: Jonathan Moules (Jonathan Moules)
Original Redmine Issue: 6218
Affected QGIS version: 1.8.0
Redmine category:symbology


This one may be a bit hard to explain.

  1. I load a shapefile, it has exactly one attribute column (we'll call it "alpha") it displays fine.
  2. I go to style -> Categorised, and click "classify". This gives me a random looking classification, but displays fine.
  3. I click "load style", navigate to a style (which is set to a different column "beta"), and click ok. Style loads fine, but all map data disappears.
  4. I confirm that the "column" is correct (there's only one column in my shapefile remember).

To get my data showing again, I have to click "classify", then when a box pops up asking me to "confirm delete" I have to click "no". This then makes my data display properly with the correct classification from the loaded file.

I guess this may be because there's only one column in the shapefile (which is different), but it may also happen if the style column is the first of a set of columns in a shapefile.

@qgib
Copy link
Contributor Author

qgib commented Sep 4, 2012

Author Name: Paolo Cavallini (@pcav)


  • fixed_version_id was configured as Version 2.0.0

@qgib
Copy link
Contributor Author

qgib commented Sep 14, 2012

Author Name: Jonathan Moules (Jonathan Moules)


If I change the QML file such that:

becomes

and then load it (Step 3), it renders correctly.

(It looks like the bold thing doesn't work for highlighting in those sentences for some reason.

@qgib
Copy link
Contributor Author

qgib commented Jun 28, 2014

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


  • fixed_version_id was changed from Version 2.0.0 to Future Release - Lower Priority

@qgib
Copy link
Contributor Author

qgib commented Dec 13, 2015

Author Name: Médéric RIBREUX (Médéric RIBREUX)


Hello, bug triage...

I've made some tests on QGIS 2.13 master and when I load the qml with the wrong column name, every feature got the NULL value style (which is produced by default when using categorized renderer).
This seems correct for me because the style is really applied as it should be: when the column used for categorization is not in the layer, use the null value style. Of course, if you have deleted the null value before exporting to qml, nothing is rendered.

So, if you want to have categorized styles that are "portable", you need to be careful to export the style with a NULL value class.

I think that QGIS should not try to automatically find the best column candidate because it could create some undetected errors (the class are not the same, some geometries are not correctly displayed because they don't belong to a class, etc.).

Can we close this bug ?


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Dec 30, 2015

Author Name: Giovanni Manghi (@gioman)


seems also somehow duplicate of #13833


  • resolution was changed from to duplicate
  • status_id was changed from Feedback to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Symbology Related to vector layer symbology or renderers labels May 24, 2019
@qgib qgib added this to the Future Release - Lower Priority milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
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! Symbology Related to vector layer symbology or renderers
Projects
None yet
Development

No branches or pull requests

1 participant