Newer
Older
osmCoverage / src / coverage_POSTOFFICE.sh
#
# HOST ~/docker/osm_get
# 
# cd ~/docker/osm_get
# docker run --rm -it -v $(pwd)/share:/root/osmCoverage/share haya4/osmget bash
# docker run --rm -t  -v $(pwd)/share:/root/osmCoverage/share haya4/osmget bash coverage_POSTOFFICE_.sh
#
pwd
cp share/pbfDate.json GML_POSTOFFICE/pbfDate.json
cp share/gisdb.properties    gisdb.properties
cp share/osmdb.properties    osmdb.properties
cp share/database.properties  database.properties

rm -rf database
mkdir database
CLASSPATH=.:osmCoverage.jar:hayashi.jar:hsqldb.jar:postgresql.jar:javax.json.jar
export CLASSPATH

# make to PostGIS
java -cp $CLASSPATH osm.jp.coverage.postoffice.DbPostoffice -DROP
java -cp $CLASSPATH osm.jp.coverage.postoffice.DbExistPostoffice
java -cp $CLASSPATH osm.jp.coverage.postoffice.Postoffice
java -cp $CLASSPATH osm.jp.coverage.postoffice.ToPostgis osmdb
java -cp $CLASSPATH osm.jp.coverage.postoffice.ToPostgis gisdb

## export from PostGIS to 'postoffice.json postoffice0.json postoffice1.json postoffice2.json'
## create 'postofficeJSON.tgz' from 'postoffice.json postoffice0.json postoffice1.json postoffice2.json'
java -cp $CLASSPATH osm.jp.coverage.postoffice.ToGeoJSON

rm -rf vtile
mkdir -m +w vtile
cp GML_POSTOFFICE/pbfDate.json vtile
mv GML_POSTOFFICE/postoffice?.json vtile
tar czf postofficeJSON.tgz vtile/*.json
mv postofficeJSON.tgz share

## create 'coverage.postofficeJSON.tgz'
java -cp $CLASSPATH osm.jp.coverage.postoffice.ToGeoJSON -slim
java -cp $CLASSPATH osm.jp.coverage.postoffice.CoveragePostoffice coverage.postoffice.csv
java -cp $CLASSPATH osm.jp.coverage.postoffice.CoveragePostoffice coverage.postoffice.json
java -cp $CLASSPATH osm.jp.coverage.postoffice.ExportCSV
mv t_*.csv GML_POSTOFFICE

ls -l
tar czf coverage.postofficeJSON.tgz GML_POSTOFFICE/coverage.*.json GML_POSTOFFICE/*.csv GML_POSTOFFICE/pbfDate.json
mv coverage.postofficeJSON.tgz share
chmod -R 777 share