1

A shapefile of walking routes has attributes of name, date and length. If I choose Categorized style of display based on field "name" I can specify a different colour for each route and they appear as expected. If I try to categorize the features on the date field I can choose different colours for each date but the features disappear on the map.

What am I doing wrong?

Update: while creating Categories when you press the button for Classify it always creates one extra category for items which don't fit into any of the other categories. I normally remove this category by clicking on the minus sign icon. However, if I leave this category in all my lines appear on the map. If I remove the extra category all the lines disappear from the map.

Can anyone explain what is causing this?

Settings when lines plot

Settings when lines don't plot

3
  • can you add a screenshot ?
    – Snaileater
    Commented Apr 16, 2018 at 16:15
  • Simon, I think this probably has to do with the type of dates that are stored in the field. My guess is that they are in an incorrect or unrecognized format and QGIS is treating them as another value type. Take a look at the attribute table to see what the values look like.
    – Drew Smith
    Commented Apr 16, 2018 at 17:30
  • I've added a couple of screen dumps to the original post. I think the date format is correct - the dates are certainly not rejected.
    – simonc8
    Commented Apr 16, 2018 at 19:19

1 Answer 1

3

Changing Date to to_string(Date) will fix your problem.

enter image description here

1
  • Thank you so much for your insight. I wonder how you ever managed to discover that!
    – simonc8
    Commented Apr 16, 2018 at 22:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.