osmnx
Route OSMnx questions about OpenStreetMap data acquisition, graph modeling and file I/O, routing and network analysis, elevation, and static visualization.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- osmnx
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Route OSMnx questions about OpenStreetMap data acquisition, graph modeling and file I/O, routing and network analysis, elevation, and static visualization.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/package-overview.md3.7 KB
- 参考文档references/repo-provenance.md1.4 KB
- 参考文档references/repo-routing-metadata.json391 B
- 参考文档references/troubleshooting.md2.8 KB
- 脚本scripts/check_osmnx_environment.py5.3 KB
03 SKILL.md 正文
OSMnx
Use this repo skill when a task is about the osmnx package. The package helps you download, model, analyze, and visualize street networks and other OpenStreetMap features.
Read first
references/package-overview.mdfor the module map, public surface, and optional extras.references/troubleshooting.mdfor cross-cutting install/import, optional dependency, and service-limit failures.references/repo-provenance.mdwhen you need to check whether this skill still matches the current checkout.scripts/check_osmnx_environment.py --helpfor the bundled environment diagnostic.
Install and check
- Install the package itself with
python -m pip install osmnx. - If you are working from a local checkout, install it in editable mode with
python -m pip install -e .. - To cover the optional workflows used by this skill, install the relevant extras:
neighborsfor nearest-node/edge search,entropyfor orientation entropy,rasterfor raster elevation, andvisualizationfor static plots. - Minimal import check:
python -I -c "import osmnx as ox; print(ox.__version__)" - Broader environment check:
python scripts/check_osmnx_environment.py
OSMnx does not expose a general end-user CLI. Use Python imports and the bundled scripts in this skill instead.
Route map
data-acquisition
Use this when the user wants to fetch OSM data or plan a query.
Covers:
geocode,geocode_to_gdfgraph_from_bbox,graph_from_point,graph_from_address,graph_from_place,graph_from_polygon,graph_from_xmlfeatures_from_bbox,features_from_point,features_from_address,features_from_place,features_from_polygon,features_from_xml- Nominatim/Overpass settings, cache behavior, rate limits, historical snapshots, custom filters, tags, and local OSM XML fallback
Read sub-skills/data-acquisition/SKILL.md for query planning and service-limit troubleshooting.
graph-modeling-io
Use this when the user already has a graph or GeoDataFrames and needs validation, conversion, projection, simplification, truncation, or persistence.
Covers:
- graph and GeoDataFrame validation
- graph/GeoDataFrame conversion
- projection helpers
- simplification, intersection consolidation, truncation, and component selection
- GraphML, GeoPackage, and OSM XML save/load
Read sub-skills/graph-modeling-io/SKILL.md for data-model invariants and file-format rules.
routing-analysis
Use this when the user wants nearest-node/edge matching, route solving, route GeoDataFrames, speeds, travel times, statistics, bearings, or orientation entropy.
Covers:
nearest_nodes,nearest_edges- distance helpers and edge-length preparation
add_edge_speeds,add_edge_travel_timesshortest_path,k_shortest_paths,route_to_gdf- street statistics, bearings, and orientation entropy
Read sub-skills/routing-analysis/SKILL.md for weighting, optional nearest-neighbor dependencies, and route-analysis troubleshooting.
elevation-visualization
Use this when the task is about node elevations, edge grades, or static plots.
Covers:
- raster or web elevation attachment
- edge grade calculation
- graph, route, figure-ground, footprint, and orientation plots
- headless plotting and image-output settings
Read sub-skills/elevation-visualization/SKILL.md for raster, matplotlib, and headless-output guidance.
Common routing clues
- If the user mentions a city, address, boundary, building footprints, or transit stops, start with
data-acquisition. - If the user mentions a saved graph, GeoPackage, GraphML, OSM XML, CRS, projection, simplification, or validation, use
graph-modeling-io. - If the user mentions shortest paths, travel time, nearest nodes/edges, network statistics, or bearings, use
routing-analysis. - If the user mentions elevation, grades, or a saved image/plot, use
elevation-visualization. - If a task mixes workflows, complete prerequisites first and then route to the downstream sub-skill.
Runtime notes
- Public package facts and the refresh baseline live in
references/repo-provenance.md. - The managed router metadata lives in
references/repo-routing-metadata.json. - The reusable smoke helpers live under
scripts/or the owning sub-skillscripts/directories. - Do not link runtime instructions to the original repository checkout; use the bundled references and scripts in this skill tree.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).