CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/pypi-leafmap

A Python package for geospatial analysis and interactive mapping in a Jupyter environment.

54%

Overall

Evaluation54%

0.81x

Agent success when using this tile

Overview
Eval results
Files

task.mdevals/scenario-1/

Multi-Source Raster Viewer

Build a small utility that assembles an interactive map from three raster sources: a cloud-optimized GeoTIFF, a PMTiles archive, and a NetCDF variable. The map should center on the loaded data, expose layer controls, and export to a standalone HTML file.

Capabilities

Render cloud-optimized GeoTIFF

  • Given a remote COG URL and a color map name, render the raster as an interactive layer, rescale the display to the raster's native value range, and fit the view to the raster bounds. @test

Add PMTiles overlay

  • Add a PMTiles tileset from a provided URL as a toggleable overlay with default opacity of 0.7 and a user-facing label. @test

Visualize NetCDF variable

  • Load a NetCDF file from disk, select a named variable and time index, render it as a raster layer using provided min/max scaling, and include a legend that matches the scale. @test

Export map

  • Export the assembled map (with all layers added and togglable) to an HTML file at a given path, ensuring the default view shows every layer enabled. @test

Implementation

@generates

API

def build_raster_map(
    cog_url: str,
    pmtiles_url: str,
    netcdf_path: str,
    netcdf_variable: str,
    time_index: int,
    color_map: str,
    legend_min: float,
    legend_max: float,
    output_html: str,
):
    """Create and return an interactive map with COG, PMTiles, and NetCDF layers, saving it to HTML."""

Dependencies { .dependencies }

leafmap { .dependency }

Provides interactive mapping, raster tiling, PMTiles display, and NetCDF visualization. @satisfied-by

tessl i tessl/pypi-leafmap@0.52.0

tile.json