---
name: freezebase
description: >
  Lightweight geospatial helpers for reproducible MGRS grids and S3-backed raster workflows. Use when writing Python code that uses the freezebase package.
license: MIT
compatibility: Requires Python >=3.12.
---

# freezebase

Lightweight geospatial helpers for reproducible MGRS grids and S3-backed raster workflows.

## Installation

```bash
pip install freezebase
```

## API overview

### MGRS grid

10 km MGRS grid squares to align raster data onto one common grid.

- `mgrs.MGRSGrid`
- `mgrs.MGRSGeoBox`
- `mgrs.UTMZones`
- `mgrs.mgrs_to_crs`
- `mgrs.utm_to_crs`
- `mgrs.utms_to_epsgs`
- `mgrs.transform_shapely`

### Raster I/O

rasterio helpers that accept local paths and `s3://` URIs via UPath.

- `raster.rasterio_open`
- `raster.rewrite_tiff`
- `raster.write_cog`
- `raster.merge_tiffs`
- `raster.build_rasterio_profile`
- `raster.group_tiffs_by_crs`
- `raster.get_utm_zone_string`
- `raster.get_epsg_string`
- `raster.utm_zone_to_crs`
- `raster.COG_PROFILE`
- `raster.RASTERIO_PROFILE_DEFAULTS`

### VRT generation

Build VRT files without the Python GDAL dependency

- `vrt.create_decibel_vrt`
- `vrt.create_rgb_vrt`
- `vrt.build_vrt_mosaic`

### Downloads

HTTP downloads with UPath destinations

- `download.HTTPDownloader`
- `download.retry_request`

### S3

S3 `UPath` construction and retry configuration

- `s3.make_s3_upath`
- `s3.s3_env`

### Vector data

Cached vector datasets and GeoDataFrame helpers

- `vectordata.GeoVectorData`
- `vectordata.DatasetMetadata`
- `vectools.save_and_read_parquet`
- `vectools.drop_z_if_zero`
- `vectools.is_z_axis_zero`
- `vectools.simplify_multipolygons`

### Utilities

Shared helpers used across the package

- `set_loglevel`: Configure freezebase's logging levels
- `utils.get_cache_dir`
- `utils.get_data_dir`
- `utils.get_credentials_from_env`
- `utils.depends_on_optional`
- `utils.file_sha256`
- `utils.shorten_string`
- `utils.format_valid_options`
- `pandas_utils.clean_names`
- `progress.create_progress`
- `progress.track_progress`

## Resources

- [Full documentation](https://lqgentner.github.io/freezebase/)
- [llms.txt](llms.txt) — Indexed API reference for LLMs
- [llms-full.txt](llms-full.txt) — Comprehensive documentation for LLMs
- [Source code](https://github.com/lqgentner/freezebase)
