Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramya committed Jan 23, 2017
1 parent a8a8315 commit 55bc341
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions utilities/metrics/readiness.sh
Expand Up @@ -15,7 +15,7 @@ uploadTo="s3://mapbox/playground/ramyaragupathy/worldcities"


#install dependencies
npm install geojson2poly
npm install -g geojson2poly
wget -O - http://m.m.i24.cc/osmconvert.c | cc -x c - -lz -O3 -o osmconvert
sudo apt-get install jq
git clone https://github.com/geohacker/osmlazer.git
Expand Down Expand Up @@ -47,7 +47,7 @@ do
wget -c http://download.geofabrik.de/${continents[$i]}/${countries[$i]}/${states[$i]}-latest.osm.pbf
./osmconvert --complete-ways --complex-ways ${states[$i]}-latest.osm.pbf -B=${cities[$i]}.geojson.poly -o=${cities[$i]}.osm.pbf
else
wget -c http://download.geofabrik.de/${continents[$i]}/${countries[$i]}-latest.osm.pbf
wget -c http://download.geofabrik.de/${continents[$i]}/${countries[$i]}-latest.osm.pbf
./osmconvert --complete-ways --complex-ways ${countries[$i]}-latest.osm.pbf -B=${cities[$i]}.geojson.poly -o=${cities[$i]}.osm.pbf
fi
echo aws s3 cp ${cities[$i]}.osm.pbf ${uploadTo}/${cities[$i]}/
Expand All @@ -56,13 +56,14 @@ do
node osmlazer/index.js --file ${cities[$i]}.osm.pbf --mode basemap > ${cities[$i]}_basemap.json
echo aws s3 cp ${cities[$i]}_basemap.json ${uploadTo}/${cities[$i]}/
aws s3 cp ${cities[$i]}_basemap.json ${uploadTo}/${cities[$i]}/
#echo node osmlazer/index.js --file ${cities[$i]}.osm.pbf --mode poi > ${cities[$i]}_poi.json
#node osmlazer/index.js --file ${cities[$i]}.osm.pbf --mode poi > ${cities[$i]}_poi.json
#echo aws s3 cp ${cities[$i]}_poi.json ${uploadTo}/${cities[$i]}/
#aws s3 cp ${cities[$i]}_poi.json ${uploadTo}/${cities[$i]}/
# rm ${cities[$i]}.osm.pbf
# node osmlazer/index.js --file ${cities[$i]}.osm.pbf --mode address > ${cities[$i]}_address.json
# aws s3 cp ${cities[$i]}_address.json ${uploadTo}/${cities[$i]}/
echo node osmlazer/index.js --file ${cities[$i]}.osm.pbf --mode poi > ${cities[$i]}_poi.json
node osmlazer/index.js --file ${cities[$i]}.osm.pbf --mode poi > ${cities[$i]}_poi.json
echo aws s3 cp ${cities[$i]}_poi.json ${uploadTo}/${cities[$i]}/
aws s3 cp ${cities[$i]}_poi.json ${uploadTo}/${cities[$i]}/
node osmlazer/index.js --file ${cities[$i]}.osm.pbf --mode address > ${cities[$i]}_address.json
aws s3 cp ${cities[$i]}_address.json ${uploadTo}/${cities[$i]}/
rm ${cities[$i]}.osm.pbf


done

Expand Down

0 comments on commit 55bc341

Please sign in to comment.