Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build osmium_convert in order to be able to eventually replace osmosis #1877

Merged
merged 6 commits into from
Jan 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,8 @@ install:
mkdir cmake && travis_retry wget --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
export PATH=${DEPS_DIR}/cmake/bin:${PATH}

OSMOSIS_URL="http://bretth.dev.openstreetmap.org/osmosis-build/osmosis-latest.tgz"
mkdir osmosis && travis_retry wget --quiet -O - ${OSMOSIS_URL} | tar -xz -C osmosis
export PATH=${DEPS_DIR}/osmosis/bin:${PATH}

elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
brew install cmake boost libzip libstxxl libxml2 lua51 luabind tbb GDAL osmosis
brew install cmake boost libzip libstxxl libxml2 lua51 luabind tbb GDAL
fi

before_script:
Expand Down
2 changes: 0 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ RUN pip install awscli

# luabind
RUN curl https://gist.githubusercontent.com/DennisOSRM/f2eb7b948e6fe1ae319e/raw/install-luabind.sh | sudo bash
# osmosis
RUN curl -s https://gist.githubusercontent.com/DennisOSRM/803a64a9178ec375069f/raw/ | sudo bash

RUN useradd -ms /bin/bash mapbox
USER mapbox
Expand Down
18 changes: 1 addition & 17 deletions features/support/data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -229,17 +229,6 @@ def write_osm
end
end

def convert_osm_to_pbf
unless File.exist?("#{osm_file}.osm.pbf")
log_preprocess_info
log "== Converting #{osm_file}.osm to protobuffer format...", :preprocess
unless system "osmosis --read-xml #{osm_file}.osm --write-pbf #{osm_file}.osm.pbf omitmetadata=true >>#{PREPROCESS_LOG_FILE} 2>&1"
raise OsmosisError.new $?, "osmosis exited with code #{$?.exitstatus}"
end
log '', :preprocess
end
end

def extracted?
Dir.chdir TEST_FOLDER do
File.exist?("#{extracted_file}.osrm") &&
Expand All @@ -258,23 +247,18 @@ def write_timestamp
File.open( "#{prepared_file}.osrm.timestamp", 'w') {|f| f.write(OSM_TIMESTAMP) }
end

def pbf?
input_format=='pbf'
end

def write_input_data
Dir.chdir TEST_FOLDER do
write_osm
write_timestamp
convert_osm_to_pbf if pbf?
end
end

def extract_data
Dir.chdir TEST_FOLDER do
log_preprocess_info
log "== Extracting #{osm_file}.osm...", :preprocess
unless system "#{BIN_PATH}/osrm-extract #{osm_file}.osm#{'.pbf' if pbf?} #{@extract_args} --profile #{PROFILES_PATH}/#{@profile}.lua >>#{PREPROCESS_LOG_FILE} 2>&1"
unless system "#{BIN_PATH}/osrm-extract #{osm_file}.osm #{@extract_args} --profile #{PROFILES_PATH}/#{@profile}.lua >>#{PREPROCESS_LOG_FILE} 2>&1"
log "*** Exited with code #{$?.exitstatus}.", :preprocess
raise ExtractError.new $?.exitstatus, "osrm-extract exited with code #{$?.exitstatus}."
end
Expand Down
6 changes: 0 additions & 6 deletions features/support/exceptions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ def initialize code, msg
end
end

class OsmosisError < OSRMError
def initialize code, msg
super 'osmosis', code, msg, PREPROCESS_LOG_FILE, 40
end
end

class ExtractError < OSRMError
def initialize code, msg
super 'osrm-extract', code, msg, PREPROCESS_LOG_FILE, 3
Expand Down
156 changes: 0 additions & 156 deletions features/testbot/protobuffer.feature

This file was deleted.