Representing Overlapping Lines - Heat Map

1,111 views
Skip to first unread message

Ernest Johnson

unread,
Apr 14, 2016, 12:35:29 AM4/14/16
to Australian and New Zealand QGIS User Group
Hello Everyone,

I am trying to create a map of long distance bicycle routes and how many go over the same roads in the city.  I would like to symbolise it similar to how Strava Global Heatmap does it . . .


I have already created each route as a single polyline feature and put them all in the same shapefile.  The easiest way I have found to represent the overlaps is to make the layer red with about 80% transparency.  So, as the features overlap the line gets darker.  There are a lot of limitations to doing it this way.  I can't categorise the sybology in any sensible way, I can only use one colour, it doesn't look nice, etc. 

I think what would be best is to break all the features into individual segments and then have an attribute value for how many routes go over that particular segment.  Does anyone have any tips on how to accomplish this or a better way to symbolise this? 

I am using QGIS 2.12.3 and there are about 30 cycle routes I am trying to map.

Cheers,

Ernest Johnson
GIS Officer      

City of Busselton
38 Peel Terrace, Busselton WA 6280
Locked Bag 1, Busselton WA 6280
p: (08) 9781 0444       f: (08) 9752 4958
www.busselton.wa.gov.au

"Events Capital WA"

Andy Bates

unread,
Apr 14, 2016, 12:48:34 AM4/14/16
to australian-qg...@googlegroups.com

Hey Ernie, how you going?

 

You should be able to achieve that style with the layer and feature blending modes (multiply).

 

Have a look at this post to see some examples :

http://www.undertheraedar.com/2015/10/glowing-lines-in-qgis.html

 

Cheers

 

Andy

--
You received this message because you are subscribed to the Google Groups "Australian and New Zealand QGIS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to australian-qgis-use...@googlegroups.com.
To post to this group, send email to australian-qg...@googlegroups.com.
Visit this group at https://groups.google.com/group/australian-qgis-user-group.
To view this discussion on the web, visit https://groups.google.com/d/msgid/australian-qgis-user-group/ce1ed0f6-294e-489e-baf7-b8d03309b114%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andy Tice

unread,
Apr 14, 2016, 1:40:55 AM4/14/16
to australian-qg...@googlegroups.com

Hi Ernest.
Just as an idea, have you got the roads as closed polygons...or failing that as buffers around line segments?
That could be used to do a frequency count of the cycle paths.
Andy

--

Ernest Johnson

unread,
Apr 14, 2016, 2:14:53 AM4/14/16
to Australian and New Zealand QGIS User Group
Thanks Andy,

Going great.

I tried this and it looks a lot better!  Much better than simply making the layer transparent.  This still locks me into a single colour ramp though, and it would be nice to have some kind of value in the attribute table I could use.

If I can't find another solution I will probably go with your recommendation.

Cheers,

Ernie

To unsubscribe from this group and stop receiving emails from it, send an email to australian-qgis-user-group+unsub...@googlegroups.com.
To post to this group, send email to australian-q...@googlegroups.com.

George Ross

unread,
Apr 14, 2016, 4:01:51 AM4/14/16
to australian-qg...@googlegroups.com

Hi Andy.
How about densifying the node vertices along the polylines to a set length (50m?) Then extract the nodes as a point set and use the point cloud to generate a heatmap?
Regards George

To unsubscribe from this group and stop receiving emails from it, send an email to australian-qgis-use...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Australian and New Zealand QGIS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to australian-qgis-use...@googlegroups.com.
To post to this group, send email to australian-qg...@googlegroups.com.

George Ross

unread,
Apr 14, 2016, 4:03:18 AM4/14/16
to australian-qg...@googlegroups.com

*Ernie! (Not Andy)

Ernest Johnson

unread,
Apr 14, 2016, 9:19:13 PM4/14/16
to Australian and New Zealand QGIS User Group, polydef...@gmail.com
Hi George,

This was something I tried as well.  I used a SAGA geoalgorithm in the processing toolbox to convert the lines to points.  Then I created a heatmap based on the points.  It worked, but in the end it produces a raster with big blobs for how dense the routes are in a given area.  It doesn't keep the symbol discrete on the route itself or show it as a line. 

Thanks,
Ernie

To unsubscribe from this group and stop receiving emails from it, send an email to australian-qgis-user-group+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Australian and New Zealand QGIS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to australian-qgis-user-group+unsub...@googlegroups.com.

George Ross

unread,
Apr 15, 2016, 3:18:27 AM4/15/16
to Ernest Johnson, Australian and New Zealand QGIS User Group

Hey I just realised that you could use the SAGA raster layer you generated as a base and then have a vector overlay mask with linear holes associated with the road vector layer. 

All you would have to do is buffer the road line vectors out to a polyon of set width (100m?). Then use this polygon file to clip a state wide bounding box.  Finally overlay the clipped polygon file onto the rastet and then add coastline features etc.

Regards

To unsubscribe from this group and stop receiving emails from it, send an email to australian-qgis-use...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Australian and New Zealand QGIS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to australian-qgis-use...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages