Newer
Older
osmCoverageBin / coverage_BUSSTOP.sh
cd /home/yuu/Desktop/workspace/osmCoverageBin
cp ../osmCoverage/dist/osmCoverage.jar .
rm -r database
mkdir database

rm */update.sql
#java -cp .:osmCoverage.jar:hayashi_0225.jar:postgresql-9.4.1212.jar:hsqldb_2.2.9.jar osm.jp.coverage.busstop.DbBusstop -drop
java -cp .:osmCoverage.jar:hayashi_0225.jar:postgresql-9.4.1212.jar:hsqldb_2.2.9.jar osm.jp.coverage.busstop.DbBusstop
#java -cp .:osmCoverage.jar:hayashi_0225.jar:postgresql-9.4.1212.jar:hsqldb_2.2.9.jar osm.jp.coverage.busstop.DbExistBusstop -drop
java -cp .:osmCoverage.jar:hayashi_0225.jar:postgresql-9.4.1212.jar:hsqldb_2.2.9.jar osm.jp.coverage.busstop.DbExistBusstop
java -cp .:osmCoverage.jar:hayashi_0225.jar:postgresql-9.4.1212.jar:hsqldb_2.2.9.jar osm.jp.coverage.busstop.Busstop
java -cp .:osmCoverage.jar:hayashi_0225.jar:postgresql-9.4.1212.jar:hsqldb_2.2.9.jar osm.jp.coverage.busstop.ToPostgis

java -cp .:osmCoverage.jar:hayashi_0225.jar:postgresql-9.4.1212.jar:hsqldb_2.2.9.jar osm.jp.coverage.busstop.ToCartoCSV
java -cp .:osmCoverage.jar:hayashi_0225.jar:postgresql-9.4.1212.jar:hsqldb_2.2.9.jar osm.jp.coverage.busstop.ToGeoJSON
mv busstop?.json vtile
java -cp .:osmCoverage.jar:hayashi_0225.jar:postgresql-9.4.1212.jar:hsqldb_2.2.9.jar osm.jp.coverage.busstop.ToGeoJSON -slim
java -cp .:osmCoverage.jar:hayashi_0225.jar:hsqldb_2.2.9.jar:postgresql-9.4.1212.jar osm.jp.coverage.busstop.Coverage coverage.busstop.csv
java -cp .:osmCoverage.jar:hayashi_0225.jar:hsqldb_2.2.9.jar:postgresql-9.4.1212.jar osm.jp.coverage.busstop.Coverage coverage.busstop.json
mv busstop.json GML_BUSSTOP
mv busstop?.json GML_BUSSTOP
mv coverage.busstop.csv GML_BUSSTOP
mv coverage.busstop.json GML_BUSSTOP

# make Vector Tile
cd vtile
tippecanoe -l bus_map0 -rg -z16 -Z6 -o busstop0.mbtiles busstop0.json
tippecanoe -l bus_map1 -rg -z16 -Z6 -o busstop1.mbtiles busstop1.json
tippecanoe -l bus_map2 -rg -z16 -Z6 -o busstop2.mbtiles busstop2.json

cd mbutil
./mb-util --image_format=pbf ../busstop0.mbtiles tileBus0
./mb-util --image_format=pbf ../busstop1.mbtiles tileBus1
./mb-util --image_format=pbf ../busstop2.mbtiles tileBus2

cd tileBus0
gzip -d -v -r -S .pbf *
find . -type f -exec mv -v '{}' '{}'.pbf \;

cd ../tileBus1
gzip -d -v -r -S .pbf *
find . -type f -exec mv -v '{}' '{}'.pbf \;

cd ../tileBus2
gzip -d -v -r -S .pbf *
find . -type f -exec mv -v '{}' '{}'.pbf \;


# Git upload
git add *
git commit -a -m "coverage update BUSSTOP $(date +%Y-%m-%d_%H:%M)"
git push gitbucket master