A Python package for geospatial analysis and interactive mapping in a Jupyter environment.
Build a helper module that assembles Planet mosaic imagery with NAIP downloads for a user-provided region and time window. The goal is to expose simple functions for visualizing the mosaics together and exporting results. Bounding boxes are tuples in the order (min_lon, min_lat, max_lon, max_lat).
YYYY-MM month or YYYY-Q# quarter), return an interactive map containing a Planet mosaic layer and an NAIP layer clipped to the region, with layer control and optional ROI highlight. @test@generates
from pathlib import Path
from typing import Dict, Any, Optional, Tuple
import leafmap
BBox = Tuple[float, float, float, float]
def build_planet_map(bounds: BBox, period: str, roi_geojson: Optional[Dict[str, Any]] = None) -> leafmap.Map:
"""Create an interactive map with Planet imagery for the period and NAIP coverage over the bounds. Adds the ROI if provided and raises ValueError for malformed inputs."""
def save_map_html(map_obj: leafmap.Map, output_path: Path) -> Path:
"""Persist the map to an HTML file that keeps the Planet and NAIP layers and returns the written path."""
def download_naip(bounds: BBox, year: int, destination: Path) -> Path:
"""Download NAIP imagery covering the bounds for the year to a GeoTIFF at destination; ensure the file exists and raise an error on failures."""
def summarize_sources(bounds: BBox, period: str, year: int) -> Dict[str, str]:
"""Return metadata describing the selected Planet mosaic and NAIP asset for the inputs."""Provides Planet imagery layers, NAIP download helpers, and interactive mapping widgets.
tessl i tessl/pypi-leafmap@0.52.0docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10