reversejp

Crates.ioreversejp
lib.rsreversejp
version0.1.1
created_at2025-03-10 12:53:27.685551+00
updated_at2025-05-01 01:58:28.698358+00
descriptionReverseJP is a Rust library for reverse geocoding in Japan.
homepagehttps://github.com/ringsaturn/reversejp
repositoryhttps://github.com/ringsaturn/reversejp
max_upload_size
id1586579
size969,116
Han Xiao (ringsaturn)

documentation

README

Japan Geo Reverse Lookup

A Rust library for reverse geocoding in Japan. Given a longitude and latitude, this library returns information about the region(s) the coordinates are located in, including code, name, and English name.

Installation

Rust

cargo add reversejp
// reversejp-rust/examples/demo.rs
use reversejp::ReverseJp;

let reverse_jp = ReverseJp::with_embedded_data().unwrap();
let props = reverse_jp.find_properties(139.7670, 35.6812);

for prop in props {
    println!("Code: {}, Name: {}, English Name: {}", prop.code, prop.name, prop.en_name);
}

Example output:

Code: 130010, Name: 東京都, English Name: Tokyo
Code: 1310100, Name: 千代田区, English Name: Chiyoda City

Python

pip install reversejp
# reversejp-python/examples/demo.py
import reversejp

props = reversejp.find_properties(139.7670, 35.6812)

for prop in props:
    print(prop.code, prop.name, prop.en_name)

Example output:

130010 東京都 Tokyo
1310100 千代田区 Chiyoda City

License

MIT

Data is sourced from the Japan Meteorological Agency website.

Commit count: 15

cargo fmt