Files
fn_registry/python/functions/geo/extent_with_padding.md
T
egutierrez 47fac22230 chore: auto-commit (799 archivos)
- .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>
2026-05-14 00:28:20 +02:00

1.6 KiB

id, name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, example, tested, tests, test_file_path, file_path, params, output, source_repo, source_license, source_file
id name kind lang domain version purity signature description tags uses_functions uses_types returns returns_optional error_type imports example tested tests test_file_path file_path params output source_repo source_license source_file
extent_with_padding_py_geo extent_with_padding function py geo 1.0.0 pure extent_with_padding(bounds: tuple[float, float, float, float], pad_ratio: float = 0.05) -> tuple[float, float, float, float] Expande un bounding box (minx,miny,maxx,maxy) anadiendo un margen proporcional. La salida es (minx-padx, maxx+padx, miny-pady, maxy+pady).
geo
bbox
extent
padding
matplotlib
pendiente-usar
false
from geo.extent_with_padding import extent_with_padding extent = extent_with_padding((0.0, 0.0, 10.0, 10.0), 0.1) # (-1.0, 11.0, -1.0, 11.0) true
bbox_cuadrado_con_10_pct
pad_ratio_cero_no_cambia
python/functions/geo/tests/test_extent_with_padding.py python/functions/geo/extent_with_padding.py
name desc
bounds bounding box de entrada como tupla (minx, miny, maxx, maxy)
name desc
pad_ratio fraccion del ancho/alto a anadir como margen por cada lado; por defecto 0.05 (5%)
tupla (minx-padx, maxx+padx, miny-pady, maxy+pady) con el extent expandido internal:footprint_aurgi internal-aurgi ponderacion_isochronas/src/reporte_clientes_aurgi.py:90

Ejemplo

from geo.extent_with_padding import extent_with_padding

extent_with_padding((0.0, 0.0, 10.0, 10.0), 0.1)
# (-1.0, 11.0, -1.0, 11.0)

Notas

El orden de salida (minx, maxx, miny, maxy) es el que espera matplotlib ax.set_xlim/set_ylim.