Feature request #7416

classification-type shape files

Added by John Sankey almost 12 years ago. Updated almost 12 years ago.

Status:Closed
Priority:Low
Assignee:-
Category:-
Pull Request or Patch supplied:No Resolution:invalid
Easy fix?:No Copied to github as #:16380

Description

Canada is rapidly issuing all their census and geological information as .shp files with binary values - an unbelievable amount of open data. Show Discrete Values shows the values, say 1-5, and QGIS recognizes them as polygon layers, but doesn't show anything when the shapefiles are imported.

The rendering expected is 1 to >2 is one colour, 2 to >3 another... They aren't monotonic e.g. a region 5 can be completely surrounded by level 1 because they're classifications, not land elevations.

I'm told this is how ArcView handles them:
1. click the Theme menu; then click Edit Legend. The Legend Editor window will appear.
2. Click on the Legend Type field in the Legend Editor.
3. Choose Unique Value in the Legend Type dropdown menu.
4. Click on the Values Field in the Legend Editor.
5. Choose the ELEV_CLASS field in the Values Field dropdown menu.
6. Click Apply.

For Canadians, this is rapidly turning into a must-have. I hope providing this capability can be treated as higher priority than wibnis.

Screen_shot_2013-03-22_at_1.06.57_PM.png (79 KB) John Sankey, 2013-03-22 10:10 AM

Screen_shot_2013-03-22_at_4.21.31_PM.png (710 KB) John Sankey, 2013-03-22 01:23 PM

History

#1 Updated by Giovanni Manghi almost 12 years ago

  • Status changed from Open to Feedback

Not really sure I have understand this issue... anyway do you have a link to sample data or can you attach some? then can you explain again the issue please? thanks.

#2 Updated by Giovanni Manghi almost 12 years ago

Please also specify what QGIS version are you using.

#3 Updated by Nathan Woodrow almost 12 years ago

Isn't this just the Categorized or Graduated renderer in QGIS?

If not can you post a sample dataset and a image of what you need to achieve.

#4 Updated by John Sankey almost 12 years ago

"Categorized or Graduated renderer in QGIS?"
It might well be - where do I find it in QGIS 1.8.0 menus?

Sample data is at
http://http-server.carleton.ca/~dariush/Microzonation/main.html
Ottawa-Gatineau Shape Files.zip

#6 Updated by John Sankey almost 12 years ago

Found it, Nathan, clicked classify and it shows a range of colours matching the values in the window, but clicking apply then OK doesn't show anything. Do I have to 'add class' or do something else to make it work? There's nothing in the manual about it except to say it exists...

#7 Updated by Giovanni Manghi almost 12 years ago

John Sankey wrote:

Found it, Nathan, clicked classify and it shows a range of colours matching the values in the window, but clicking apply then OK doesn't show anything. Do I have to 'add class' or do something else to make it work? There's nothing in the manual about it except to say it exists...

did you choose a proper attribute to make the classification?

#9 Updated by Giovanni Manghi almost 12 years ago

John Sankey wrote:

attribute?

in a GIS an attribute is a column of the table that is associated to any vector. To classify your vectors you need to choose an attribute.

#10 Updated by John Sankey almost 12 years ago

Fair enough, Giovanni, but I should clarify: where do I choose an attribute? I can't find anything called that in layer properties; under Column there's only one option, shown. My apologies for sounding dense, but I don't know QGIS backwards and forwards the way you do...

#11 Updated by Giovanni Manghi almost 12 years ago

John Sankey wrote:

Fair enough, Giovanni, but I should clarify: where do I choose an attribute? I can't find anything called that in layer properties; under Column there's only one option, shown. My apologies for sounding dense, but I don't know QGIS backwards and forwards the way you do...

try have a look here

http://docs.qgis.org/html/en/docs/user_manual/working_with_vector/vector_properties.html#style-tab

"Categorized Renderer"

#12 Updated by John Sankey almost 12 years ago

Giovanni, I've gone through the manual, at least three times. I've saved a graduated style from the layer properties window with a name. I then click on symbol change; the style I just saved isn't listed on the symbol selector window under saved styles. There's nothing about selecting a style in the simple fill dialog either, which is where I want the renderer to use the saved style. If I open the style manager in the symbol selector window, it shows the style I've saved, but nothing I've tried has applied it to the simple fill symbol.

Might this be a directory problem, that I've saved the style in the subdirectory where the .shp file is, and the .qgs file is in a different directory? There's obviously some connection I'm missing between style and symbol. Is layer style somethiing different from symbol style, perhaps?

#13 Updated by John Sankey almost 12 years ago

here are the windows.
See also
http://gis.stackexchange.com/questions/54923/qgis-put-vector-values-into-separate-layers
Seems that no one else has figured this out either...

#14 Updated by Nathan Woodrow almost 12 years ago

You don't need to split the layer. I'll download the sample data and have a look.

#15 Updated by Nathan Woodrow almost 12 years ago

Looks fine to me

#16 Updated by John Sankey almost 12 years ago

Lovely! I tried a new project and everything shows fine. It seems that this data is referenced to UTM zone 18N, all the CanVec data is WGS83, and that QGIS 1.8.0 can't show two different CRS's in the same project. All my previous tries I was adding to an existing CanVec-based project so this one didn't show; when I try adding CanVec data to this new project none of it shows.

I'd rather work in UTM zone 18N, but enabling CRS on-the-fly crashes QGIS 1.8.0
Is there any way to hard-convert shapefiles from WGS83 to UTM 18N so everything will work together? Or, do I have to wait for a new version of QGIS for that?

#17 Updated by Nathan Woodrow almost 12 years ago

  • Resolution set to invalid
  • Status changed from Feedback to Closed
  • Priority changed from High to Low

#18 Updated by Nathan Woodrow almost 12 years ago

You can change the projection of a layer by using the Save As.. item in the right click menu on the layer. In the dialog you can select a output projection.

Also available in: Atom PDF