Crates.io | overpass |
lib.rs | overpass |
version | 0.1.0 |
source | src |
created_at | 2024-03-28 04:52:19.590433 |
updated_at | 2024-03-28 04:52:19.590433 |
description | Query OpenStreetMap Nodes |
homepage | |
repository | https://github.com/azaouit/overpass-rs |
max_upload_size | |
id | 1188751 |
size | 45,620 |
Query OpenStreetMap nodes by attribute
Use with absolute caution. Querying OSM can hog down an Overpass server easily. I am not responsible for any damage this tool may cause.
This tool is available on crates.io and can be
installed via cargo install overpass
. It features a helpful
CLI you can access via -h
/ --help
.
It is also available as a library.
overpass\
--url=https://overpass-api.de/api/interpreter \
--key=amenity \
--val=cafe bbox \
--xmin=51.305219521963295 \
--ymin=-0.7690429687500001 \
--xmax=51.82219818336938 \
--ymax=0.5273437500000064
use overpass::{BoundingBox, Config};
use tokio;
#[tokio::main]
async fn main() {
let c: Config = Config {
url: "https://overpass-api.de/api/interpreter",
timeout: 25,
key: "amenity",
val: "cafe",
};
let b: BoundingBox = BoundingBox {
x_min: 51.305219521963295,
y_min: -0.7690429687500001,
x_max: 51.82219818336938,
y_max: 0.5273437500000064,
};
let resp = b.search(&c).await.expect("failed query");