test = function(){
let index = []
roads.forEach(function(r){
let obj = {}
obj.name = r.properties.name
obj.points = []
obj.id = r.properties.id
roads.forEach(function(ki,i){
if (ki.properties.id != r.properties.id && ki.properties.name !== undefined && r.properties.name !== undefined){
let int = turf.lineIntersect(r, ki);
if (int.features.length > 0) {
int.features.forEach(function(inter){
if (inter.properties){
inter.properties.intersection = ki.properties.name
inter.properties.ID = ki.properties.id
obj.points.push(inter)
}
})
index.push(obj)
}
}
}
)
})
return index}();