---
id: point_in_polygons_bbox_py_geo
name: point_in_polygons_bbox
kind: function
lang: py
domain: geo
version: "1.0.0"
purity: pure
signature: "point_in_polygons_bbox(lon: float, lat: float, polygons: list[list[list[tuple[float, float]]]], bboxes: list[tuple[float, float, float, float]]) -> bool"
description: "Comprueba si el punto esta en CUALQUIER poligono de la lista usando prefiltraje por bounding box para mayor rendimiento."
tags: [geo, polygon, point-in-polygon, bbox, batch]
uses_functions: [point_in_polygon_py_geo]
uses_types: []
returns: []
returns_optional: false
error_type: ""
imports: []
example: |
  from geo.point_in_polygons_bbox import point_in_polygons_bbox
  from geo.polygon_bbox import polygon_bbox
  p1 = [[(0.0,0.0),(1.0,0.0),(1.0,1.0),(0.0,1.0)]]
  p2 = [[(5.0,5.0),(6.0,5.0),(6.0,6.0),(5.0,6.0)]]
  bboxes = [polygon_bbox(p1), polygon_bbox(p2)]
  point_in_polygons_bbox(0.5, 0.5, [p1, p2], bboxes)  # True
tested: true
tests: ["punto_en_primer_poligono", "punto_en_segundo_poligono", "punto_fuera_de_todos"]
test_file_path: "python/functions/geo/tests/test_point_in_polygons_bbox.py"
file_path: "python/functions/geo/point_in_polygons_bbox.py"
params:
  - {name: lon, desc: "longitud del punto a comprobar en grados decimales"}
  - {name: lat, desc: "latitud del punto a comprobar en grados decimales"}
  - {name: polygons, desc: "lista de poligonos, cada uno como lista de anillos (exterior + holes)"}
  - {name: bboxes, desc: "lista de bboxes precalculados (minx, miny, maxx, maxy) para cada poligono, en el mismo orden"}
output: "True si el punto esta dentro de al menos uno de los poligonos"
source_repo: "internal:footprint_aurgi"
source_license: "internal-aurgi"
source_file: "zonas_mapas_aurgi/backend/app.py:745"
---

## Ejemplo

```python
from geo.point_in_polygons_bbox import point_in_polygons_bbox
from geo.polygon_bbox import polygon_bbox

p1 = [[(0.0,0.0),(1.0,0.0),(1.0,1.0),(0.0,1.0)]]
bboxes = [polygon_bbox(p1)]
point_in_polygons_bbox(0.5, 0.5, [p1], bboxes)  # True
```

## Notas

Los bboxes deben precalcularse con polygon_bbox y pasarse en el mismo orden que polygons.
