https://github.com/meekyphotos/whosonfirst2pgsql
It reads an uncompressed whosonfirst tar and uploads it to the target Postgres
https://github.com/meekyphotos/whosonfirst2pgsql
database postgresql whosonfirst
Last synced: 6 months ago
JSON representation
It reads an uncompressed whosonfirst tar and uploads it to the target Postgres
- Host: GitHub
- URL: https://github.com/meekyphotos/whosonfirst2pgsql
- Owner: meekyphotos
- License: apache-2.0
- Created: 2021-07-14T15:54:08.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-03-07T01:58:02.000Z (over 3 years ago)
- Last Synced: 2024-11-24T12:53:04.809Z (over 1 year ago)
- Topics: database, postgresql, whosonfirst
- Language: Go
- Homepage:
- Size: 42 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# whosonfirst2pgsql
### NAME:
w2pgsql
### USAGE:
w2pgsql [global options] command [command options] [arguments...]
#### DESCRIPTION:
Read Administrative Boundaries from https://geocode.earth/data/whosonfirst in TAR bundles format and transpose that data into postgresql.
Before running this tool the download needs to be decompressed using bz2:
```bash
bzip2 -d whosonfirst-data-admin-latest.tar.bz2
```
### COMMANDS:
help, h Shows a list of commands or help for one command
### GLOBAL OPTIONS:
|Flag|Description|
|---|---|
|-a, --append |Run in append mode. Adds the OSM change file into the database without removing existing data. (default: false)|
|-c, --create |Run in create mode. This is the default if -a, --append is not specified. Removes existing data from the database tables! (default: true)|
|-d value, --database `value` |The name of the PostgreSQL database to connect to. If this parameter contains an = sign or starts with a valid URI prefix (postgresql:// or postgres://), it is t reated as a conninfo string. See the PostgreSQL manual for details.|
|-U value, --username `value` |Postgresql user name. (default: "postgres")|
|-W, --password |Force password prompt. (default: false)|
|-H value, --host `value` |Database server hostname or unix domain socket location. (default: "localhost")|
|-P value, --port `value` |Database server port. (default: 5432)|
|--workers `value` |Number of workers (default: 4)|
|--latlong |Store coordinates in degrees of latitude & longitude. (default: false)|
|-t value, --table `value` |Output table name (default: "planet_data")|
|-j, --json |Add tags without column to an additional json (key/value) column in the database tables. (default: false)|
|--schema value |Use PostgreSQL schema SCHEMA for all tables, indexes, and functions in the pgsql output (default is no schema, i.e. the public schema is used). (default: "public")|
|--help, -h |show help (default: false)|
### RELEASES
Releases are available for both Linux and Windows