leafmap
Routes leafmap users to interactive maps, geospatial data helpers, MapLibre viewers, and optional backend choices.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- leafmap
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Routes leafmap users to interactive maps, geospatial data helpers, MapLibre viewers, and optional backend choices.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/repo-provenance.md1.4 KB
- 参考文档references/repo-routing-metadata.json316 B
- 参考文档references/troubleshooting.md4.5 KB
- 参考文档references/workflow-overview.md2.5 KB
- 脚本scripts/check_leafmap_smoke.py6.6 KB
03 SKILL.md 正文
leafmap
Purpose
Use this skill for the leafmap Python package when the task is about interactive geospatial maps, notebook-first data helpers, MapLibre viewers, or choosing among optional backends.
Quick install
Use the published package unless you are explicitly working from a source checkout:
pip install leafmap
For a source checkout, editable install is fine too:
pip install -e .
Add only the targeted extras you actually need:
pip install "leafmap[maplibre]" localtileserver pmtiles fionafor MapLibre viewer workflows, especiallyview-vectorand local GeoJSON inspection.pip install planetary-computer rioxarray xarraywhen data-helper imports complain about those packages.pip install "leafmap[backends]"or a backend-specific package only when you truly need a non-default backend.
Minimal smoke check
python -m leafmap --help
python -c "import leafmap; print(leafmap.__version__)"
If you want a richer local sanity check, run the shared helper:
python scripts/check_leafmap_smoke.py --mode all
Route map
sub-skills/interactive-maps/— default Jupyter maps, basemaps, layers, legends, widgets, split maps, and HTML export.sub-skills/data-workflows/— CSV/GeoJSON/SHP/KML conversion, STAC, Planetary Computer, OSM, fire, Terrascope, and other data helpers.sub-skills/maplibre-viewers/— MapLibre GL maps,view-vector,view-raster,view_pmtiles, andpython -m leafmapCLI behavior.sub-skills/alternate-backends/— kepler, plotly, bokeh, pydeck/deck.gl, HERE, and mapbox backend choice and caveats.
How to choose
- Start with
interactive-mapsunless the task clearly needs remote data retrieval or a standalone viewer. - Use
data-workflowsfor any request that starts with a file, a catalog, a place query, or a service search. - Use
maplibre-viewersfor browser-first HTML output, local file inspection, or CLI viewer commands. - Use
alternate-backendsonly when the user explicitly wants a non-default backend or is diagnosing an optional-backend import issue.
What to read next
references/workflow-overview.mdfor the route map and verified entry points.references/troubleshooting.mdfor cross-cutting install/import, widget, data, viewer, and optional-backend issues.references/repo-provenance.mdwhen you need to check whether this skill is stale for the current repository snapshot.
Notes
- The package exposes both notebook-first and viewer-first workflows; do not force one backend when the request clearly wants the other.
- Optional backends are not the same as default interactive maps. If a backend import fails, route to a verified backend rather than guessing.
- Keep runtime links inside the generated skill tree; do not point back into the source checkout.
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).