Newer
Older
osmCoverage / src / coverage_FUEL.sh
#
# HOST ~/docker/osm_get
# 
# cd ~/docker/osm_get
# docker run --rm -it -v $(pwd)/share:/root/osmCoverageBin/share haya4/osmget bash
# docker run --rm -t  -v $(pwd)/share:/root/osmCoverageBin/share haya4/osmget bash coverage_FUEL_.sh
#
pwd
cp share/pbfDate.json GML_FUEL/pbfDate.json
curl -o GML_FUEL/P07-15.removed.json.txt https://raw.githubusercontent.com/yuuhayashi/coverageWeb/master/GML_FUEL/P07-15.removed.json.txt

mkdir database
java -cp .:osmCoverage.jar:hayashi.jar:hsqldb.jar:postgresql.jar:javax.json.jar osm.jp.coverage.fuel.DbFuel -INIT
java -cp .:osmCoverage.jar:hayashi.jar:hsqldb.jar:postgresql.jar:javax.json.jar osm.jp.coverage.fuel.DbFuel -IMPORT GML_FUEL
java -cp .:osmCoverage.jar:hayashi.jar:hsqldb.jar:postgresql.jar:javax.json.jar osm.jp.coverage.fuel.DbFuel -REMOVED GML_FUEL/P07-15.removed.json.txt

java -cp .:osmCoverage.jar:hayashi.jar:hsqldb.jar:postgresql.jar:javax.json.jar osm.jp.coverage.fuel.DbExistFuel -INIT
java -cp .:osmCoverage.jar:hayashi.jar:hsqldb.jar:postgresql.jar:javax.json.jar osm.jp.coverage.fuel.DbExistFuel -IMPORT

java -cp .:osmCoverage.jar:hayashi.jar:hsqldb.jar:postgresql.jar:javax.json.jar osm.jp.coverage.fuel.Fuel
java -cp .:osmCoverage.jar:hayashi.jar:hsqldb.jar:postgresql.jar:javax.json.jar osm.jp.coverage.fuel.DbFuel -OUTPUT GML_FUEL/P07-15.removed.txt
mv GML_FUEL/P07-15.removed.txt GML_FUEL/P07-15.removed.json.txt

java -cp .:osmCoverage.jar:hayashi.jar:hsqldb.jar:postgresql.jar osm.jp.coverage.fuel.ToPostgis osmdb
java -cp .:osmCoverage.jar:hayashi.jar:hsqldb.jar:postgresql.jar osm.jp.coverage.fuel.ToPostgis gisdb

## create 't_fuel.carto.csv'
java -cp .:osmCoverage.jar:hayashi.jar:hsqldb.jar:postgresql.jar:javax.json.jar osm.jp.coverage.fuel.ToCartoCSV

## export from PostGIS to 'fuel.json fuel0.json fuel1.json fuel2.json'
## create 'fuelJSON.tgz' from 'fuel.json fuel0.json fuel1.json fuel2.json'
java -cp .:osmCoverage.jar:hayashi.jar:hsqldb.jar:postgresql.jar:javax.json.jar osm.jp.coverage.fuel.ToGeoJSON
rm -rf vtile
mkdir -m +w vtile
cp GML_FUEL/pbfDate.json vtile
mv fuel?.json vtile
tar czf share/fuelJSON.tgz vtile/*.json

## create 'coverage.fuelJSON.tgz'
java -cp .:osmCoverage.jar:hayashi.jar:hsqldb.jar:postgresql.jar:javax.json.jar osm.jp.coverage.fuel.ToGeoJSON -slim
java -cp .:osmCoverage.jar:hayashi.jar:hsqldb.jar:postgresql.jar:javax.json.jar osm.jp.coverage.fuel.Coverage coverage.fuel.csv
java -cp .:osmCoverage.jar:hayashi.jar:hsqldb.jar:postgresql.jar:javax.json.jar osm.jp.coverage.fuel.Coverage coverage.fuel.json
java -cp .:osmCoverage.jar:hayashi.jar:hsqldb.jar:postgresql.jar:javax.json.jar osm.jp.coverage.fuel.ExportCSV
mv t_*.csv GML_FUEL

ls -l
mv fuel?.json GML_FUEL
mv fuel.json GML_FUEL
tar czf share/coverage.fuelJSON.tgz GML_FUEL/coverage.*.json GML_FUEL/*.csv GML_FUEL/pbfDate.json GML_FUEL/*.json.txt
chmod -R 777 share