Fix raster_source + tests

This commit is contained in:
Lauren Budorick
2016-03-30 15:29:47 -07:00
committed by Patrick Niklaus
parent 4b60fc4747
commit 49e2cb6c36
6 changed files with 31 additions and 23 deletions
+4
View File
@@ -13,6 +13,9 @@ function way_function (way, result)
result.name = name
end
result.forward_mode = mode.cycling
result.backward_mode = mode.cycling
result.forward_speed = 15
result.backward_speed = 15
end
@@ -30,6 +33,7 @@ function source_function ()
end
function segment_function (source, target, distance, weight)
io.write("lookup for " .. source.lon .. "," .. source.lat .. " " .. target.lon .. "," .. target.lat .. "\n")
local sourceData = sources:query(raster_source, source.lon, source.lat)
local targetData = sources:query(raster_source, target.lon, target.lat)
io.write("evaluating segment: " .. sourceData.datum .. " " .. targetData.datum .. "\n")
@@ -13,6 +13,9 @@ function way_function (way, result)
result.name = name
end
result.forward_mode = mode.cycling
result.backward_mode = mode.cycling
result.forward_speed = 15
result.backward_speed = 15
end