1

I would like to colour code a shapefile containing road polylines to represent the heaviest flows of traffic. The shapefile contains attribute data linked to each section of road where road traffic counts were taken (count points). There are two fields that contain Road names and a unique count point ID.

The second shapefile contains point geometry representing the location of each count point. The attribute data contains various fields including traffic numbers along each section of road, road name and a corresponding count point ID.

How do I A) best combine the two sets of attributes to then be able to B) colour code the busiest roads in the darkest red?

Road traffic data Colour Categories Attribute data

4
  • 2
    Do you want to colour the points or the lines?
    – Nathan W
    May 10, 2013 at 4:17
  • Please provide a sketch of what you want to achieve.
    – underdark
    May 10, 2013 at 20:27
  • Hi Nathan and Underdark and thanks for your help. I have added some screenshots to clarify my question. You can see I have added a graduated colour ramp style to the traffic count point data with dark red representing the highest traffic counts. I wish to switch off the point layer and render the corresponding road segment polylines in the same colour style. Thanks.
    – Jeremy
    May 11, 2013 at 15:51
  • You should be able to use join on the "CP" field and then apply a graduated style.
    – underdark
    May 11, 2013 at 16:15

1 Answer 1

1

This would be easily done by simple Join, since an unique field CP was already given to both Point and Polyline layers.

A Virtual Layer can be helpful:

SELECT Polyline_data.*, Point_data.AllMotorVehicles
FROM Point_data JOIN Polyline_data
ON Point_data.CP = Polyline_data.CP

This query will return a new polyline layer with AllMotorVehicles field (copied from point layer), which can be used to color code these line segments.

Your Answer

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

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