Skip to content

Repository files navigation

ABR Geocoder

日本語

Japanese address processing tools using the Address Base Registry (ABR).

Quickstart

cd quickstart
docker compose up -d
curl -s "http://localhost:3001/geocode?address=東京都千代田区紀尾井町1-3"

Includes test data (Tokyo prefecture/city/town). See quickstart/README.md for details.

Nationwide Data

Nationwide data, and residential/parcel data, need PostgreSQL. The docker-compose.yml at the repository root runs PostgreSQL, abrdb and abrg together.

cp .env.example .env
# edit .env and set DB_PASSWORD

docker compose up -d postgres

# choose what to import
docker compose run --rm abrdb_app init --pref all --category all --pos

# download from ABR and load into PostgreSQL
docker compose run --rm abrdb_app import

# build the DuckDB cache from PostgreSQL
docker compose run --rm abrg_app cache build

# start the API server
docker compose up -d abrg_app
curl -s "http://localhost:3000/geocode?address=東京都千代田区紀尾井町1-3"

Data persists in three named volumes.

Volume Contents
postgres_data the PostgreSQL database
abrdb_data ABR archives as downloaded
abrg_cache the DuckDB cache abrg reads

docker compose down keeps them. Use down -v to start over.

See each README for per-command options:

Data Source

This software uses the Address Base Registry (ABR).

See the Terms of Service for data usage.

License

MIT

About

Address Base Registry Geocoder by digital.go.jp

Topics

Resources

Security policy

Stars

165 stars

Watchers

9 watching

Forks

Releases

Packages

Used by

Contributors

Languages