47fac22230
- .claude/CLAUDE.md - .claude/commands/subagentes.md - .claude/rules/INDEX.md - .mcp.json - bash/functions/cybersecurity/analyze_dns.md - bash/functions/cybersecurity/audit_http_headers.md - bash/functions/cybersecurity/audit_ssh_config.md - bash/functions/cybersecurity/check_firewall.md - bash/functions/cybersecurity/detect_suspicious_users.md - bash/functions/cybersecurity/encrypt_file.md - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.9 KiB
1.9 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path, source_repo, source_license, source_file
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | params | output | tested | tests | test_file_path | file_path | source_repo | source_license | source_file | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| add_basemap_osm | function | py | geo | 1.0.0 | impure | def add_basemap_osm(ax: Axes, zoom: int = 9, cache_dir: str | Path | None = None) -> None | Añade un basemap OpenStreetMap Mapnik a un Axes de matplotlib usando contextily. Captura silenciosamente errores de red — nunca lanza. |
|
false | error_go_core |
|
|
None. Modifica el Axes in-place añadiendo el basemap como imagen de fondo. | true |
|
python/functions/geo/tests/test_add_basemap_osm.py | python/functions/geo/add_basemap_osm.py | internal:footprint_aurgi | internal-aurgi | ponderacion_isochronas/src/recomendador_centros.py:220 |
Ejemplo
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
from geo.add_basemap_osm import add_basemap_osm
fig, ax = plt.subplots()
ax.set_xlim(-430000, -350000)
ax.set_ylim(4500000, 4600000)
add_basemap_osm(ax, zoom=10)
fig.savefig("mapa.png")
Notas
Requiere contextily. Si contextily no está instalado, retorna sin hacer nada. Errores de red (timeout, sin conexión, tile no disponible) se capturan con except Exception: pass para no interrumpir el pipeline de generación de reportes.