Great, thank you very much for pointing me in the right direction. I ended up using a combination of a java script to parse the OSM data (extract roads, etc) and then R to produce heat plots. For anyone interested, the R script goes as follows (roads.csv is the output from parsing the osm data):


library(sp)
library(maptools)
library(spatstat)

Get the data and format it according to sp and spatstat formats

roads ← read.csv(‘dataProcessing/ScriptsToParseOSMdata/roads.csv’)
coords ← SpatialPoints(roads[, c(“lon”,“lat”)]) #lon and lat are the names of my lon/lat variables
roads1 ← SpatialPointsDataFrame(coords,roads)
roads.ppp ← as(coords,“ppp”)

Calculate and plot density

k025 ← density(roads.ppp, sigma=0.0015)
plot(as(roads1, “Spatial”), axes=T) #an empty frame . Optional
plot(k025, add=T)
plot(roads1,add=T,col=“#ff000010”)

A great help was: http://www.bias-project.org.uk/ASDARcourse/ (lecture notes at the bottom)

Thanks and best,
Tom