data-acquisition
Acquire OSMnx graphs, features, geocodes, and local OSM XML with query-geometry selection, custom tags/filters, cache and rate-limit controls, and historical Overpass snapshots.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- data-acquisition
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Acquire OSMnx graphs, features, geocodes, and local OSM XML with query-geometry selection, custom tags/filters, cache and rate-limit controls, and historical Overpass snapshots.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/query-settings.md5.0 KB
- 参考文档references/troubleshooting.md3.9 KB
- 参考文档references/workflows.md9.2 KB
- 脚本scripts/osmnx_query_template.py20.2 KB
03 SKILL.md 正文
Data Acquisition
Use this route when the user wants to fetch OpenStreetMap data, plan a query, or recover data from a local OSM XML file.
Covers
geocodeandgeocode_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_xmlsettingsfor Nominatim, Overpass, caching, timeouts, headers,cache_only_mode, and historical snapshots- OSM tag dictionaries and graph
custom_filterstrings/lists - local OSM XML fallback from downloaded
.osm,.bz2, or.gzfiles
Route elsewhere
- Graph validation, conversion, projection, simplification, and persistence →
graph-modeling-io - Nearest-node/edge matching, routing, travel time, and stats →
routing-analysis - Plotting downloaded data →
elevation-visualization
Start here
- Choose the query geometry.
- bbox =
(left, bottom, right, top)in EPSG:4326. - point =
(lat, lon)plusdistmeters. - address = geocode an address to a point, then query around it.
- place = geocode to a Polygon/MultiPolygon boundary.
- polygon = already have a valid Shapely Polygon or MultiPolygon.
- xml = local OSM XML fallback when the data is already downloaded.
- bbox =
- Choose the output family.
- Graph queries return
nx.MultiDiGraph. - Feature queries return a GeoDataFrame indexed by
elementand OSM ID. - Geocoding returns either
(lat, lon)or a place/element GeoDataFrame.
- Graph queries return
- If you need a historical snapshot, set the Overpass date in
settings.overpass_settingsbefore querying. - If you only need a plan, run scripts/osmnx_query_template.py and do not hit the network.
Common request patterns
- “Get streets around a point or address” →
graph_from_pointorgraph_from_address. - “Get streets for a neighborhood or city boundary” →
graph_from_place. - “Get building footprints, amenities, or transit stops” →
features_from_*. - “Resolve a place to a boundary or OSM ID” →
geocode_to_gdf. - “Use a local OSM extract” →
graph_from_xmlorfeatures_from_xml.
Query rules that matter
graph_from_point(..., dist_type="network")uses nearest-node search after building the bbox graph. On an unprojected graph this needs the nearest-neighbor optional dependency set; usedist_type="bbox"if you want the simpler path.graph_from_placeandfeatures_from_placeneed the geocoder result to be a Polygon or MultiPolygon. If the place resolves to a point, use the address workflow or pass a better query / differentwhich_result.geocode_to_gdf(..., by_osmid=True)expects a string OSM ID with anN,W, orRprefix.which_resultis 1-based. For lists of queries, pass a matching list ofwhich_resultvalues.features_from_*tag dicts use union semantics:True= any value,str= one exact value,list[str]= any listed value.custom_filterfor graph queries is different: a string means intersect those conditions; a list means union the alternatives.
Expected outputs
- Graph builders should yield a graph in EPSG:4326 with
crs, nodex/y/street_count, and edgeosmid/length. - Feature builders should yield a nonempty GeoDataFrame when the query is valid and tags match. Empty or filtered-out results usually mean the query or tags were too narrow, not that acquisition failed.
- Local XML builders should work without network access and are the preferred fallback for already-downloaded OSM data.
Read these next
- references/workflows.md for function-by-function recipes and parameter choices.
- references/query-settings.md for Nominatim/Overpass/cache/header/date settings.
- references/troubleshooting.md for empty responses, bad geometries, rate limits, and XML fallback failures.
- scripts/osmnx_query_template.py to print a safe no-network query plan before making any live request.
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).