Crates.io | osm_graph |
lib.rs | osm_graph |
version | 0.1.1 |
source | src |
created_at | 2024-02-02 16:59:36.447304 |
updated_at | 2024-02-22 20:47:33.93266 |
description | This library provides a set of tools for generating isochrones from geographic coordinates. It leverages OpenStreetMap data to construct road networks and calculate areas accessible within specified time limits. The library is designed for both Rust and Python, offering high performance and easy integration into data science workflows. |
homepage | |
repository | https://github.com/kyleloving/osm_graph/tree/main |
max_upload_size | |
id | 1124578 |
size | 80,281 |
Quickly generate isochrones for Python and Rust!
This library provides a set of tools for generating isochrones and reverse isochrones from geographic coordinates. It leverages OpenStreetMap data to construct road networks and calculate areas accessible within specified time limits. The library is designed for both Rust and Python, offering high performance and easy integration into data science workflows.
To use the library in Rust, add it to your Cargo.toml:
[dependencies]
osm-graph = "0.1.0"
For Python,
pip install pysochrone
Or, ensure you have Rust and maturin installed, then build and install the Python package:
maturin develop
Rust
use osm_graph::{calculate_isochrones_from_point, HullType};
async fn main() {
let isochrone = isochrone::calculate_isochrones_from_point(
48.123456,
11.123456,
10_000.0,
vec![300.0, 600.0, 900.0, 1_200.0, 1_500.0, 1_800.0],
overpass::NetworkType::Drive,
isochrone::HullType::Convex,
)
.await
.unwrap();
}
Python
import pysochrone
isochrones = pysochrone.calc_isochrones(
48.123456,
11.123456,
5000,
[600, 1200, 1800],
"Drive",
"Convex"
)
[ ] Testing and benchmarks. [ ] Customizable Speed Limits: Allow users to specify custom speed limits for different road types. [x] Support for Pedestrian and Bicycle Networks: Expand the graph construction to support pedestrian and bicycle network types. [ ] Topological simplification of osm graphs for more efficient downstream analytics. [ ] Additional Roadnetwork analytics. [ ] Routing engine. [ ] Advanced Caching Strategies: Implement more sophisticated caching mechanisms for dynamic query parameters. [ ] Interactive Visualization Tools: Develop a set of tools for interactive visualization of isochrones in web applications. [ ] API Integration: Provide integration options with third-party APIs for enhanced data accuracy and features. [ ] Optimization and Parallel Computing: Further optimize the graph algorithms and explore parallel computing options for large-scale data.
Contributions are welcome! Please submit pull requests, open issues for discussion, and suggest new features or improvements.
This library is licensed under MIT License.