cuke: use .osm by default, add tests for .pbf

This commit is contained in:
Emil Tin
2014-03-19 18:03:38 +01:00
committed by Emil Tin
parent 72f41c5b4f
commit 220e7748a9
3 changed files with 171 additions and 2 deletions
+11 -2
View File
@@ -13,7 +13,7 @@ WAY_SPACING = 100
DEFAULT_GRID_SIZE = 100 #meters
PROFILES_PATH = '../profiles'
BIN_PATH = '../build'
DEFAULT_INPUT_FORMAT = 'osm'
DEFAULT_ORIGIN = [1,1]
class Location
@@ -25,6 +25,15 @@ class Location
end
end
def set_input_format format
raise '*** Input format must be eiter "osm" or "pbf"' unless ['pbf','osm'].include? format.to_s
@input_format = format.to_s
end
def input_format
@input_format || DEFAULT_INPUT_FORMAT
end
def sanitized_scenario_title
@sanitized_scenario_title ||= @scenario_title.gsub /[^0-9A-Za-z.\-]/, '_'
end
@@ -244,8 +253,8 @@ def write_timestamp
end
def reprocess
use_pbf = true
Dir.chdir TEST_FOLDER do
use_pbf = (input_format=='pbf')
write_osm
write_timestamp
convert_osm_to_pbf if use_pbf