Skip to content

Instantly share code, notes, and snippets.

@ImreSamu
Created January 26, 2016 12:39
Show Gist options
  • Select an option

  • Save ImreSamu/7e38417a4baab0765d30 to your computer and use it in GitHub Desktop.

Select an option

Save ImreSamu/7e38417a4baab0765d30 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -x
impconnection=postgis://$PGHOST/$PGDATABASE
monaco_osm_pbf=./parser/pbf/monaco-20150428.osm.pbf
mapping_file=./test/single_table_mapping.json
function import {
/go/src/github.com/omniscale/imposm3/imposm3 import -mapping $mapping_file \
-read $monaco_osm_pbf \
-write \
-overwritecache \
-connection $impconnection
}
function dbtest {
psql -c 'select current_user;'
psql -c '\dn'
psql -c 'select schema_name from information_schema.schemata ;'
}
PGUSER=postgres PGPASSWORD= import
echo " --------- osm pguser ------------- "
PGUSER=osm PGPASSWORD=osm import
PGUSER=postgres PGPASSWORD= dbtest
echo " --------- osm pguser ------------- "
PGUSER=osm PGPASSWORD=osm dbtest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment