voxcity.downloader.gbaΒΆ

Downloader for Global Building Atlas (GBA) LOD1 polygons.

This module downloads GeoParquet tiles from the Global Building Atlas (GBA) hosted at data.source.coop, selects tiles intersecting a user-specified rectangle, loads them into a GeoDataFrame, and filters features to the rectangle extent.

Tile scheme: - Global 5x5-degree tiles named like: e010_n50_e015_n45.parquet

  • longitudes: e/w with 3-digit zero padding (e.g., e010, w060)

  • latitudes: n/s with 2-digit zero padding (e.g., n50, s25)

  • filename order: west_lon, north_lat, east_lon, south_lat

Usage:

gdf = load_gdf_from_gba(rectangle_vertices=[(lon1, lat1), (lon2, lat2), …])

Notes: - Output CRS is EPSG:4326. - Requires pyarrow or fastparquet for parquet reading via GeoPandas.

FunctionsΒΆ

load_gdf_from_gba(β†’ Optional[geopandas.GeoDataFrame])

Download GBA tiles intersecting a rectangle and return combined GeoDataFrame.

Module ContentsΒΆ

voxcity.downloader.gba.load_gdf_from_gba(rectangle_vertices: Sequence[Tuple[float, float]], base_url: str = 'https://data.source.coop/tge-labs/globalbuildingatlas-lod1', download_dir: str | None = None, clip_to_rectangle: bool = False) geopandas.GeoDataFrame | NoneΒΆ

Download GBA tiles intersecting a rectangle and return combined GeoDataFrame.

Parameters:
  • rectangle_vertices – Sequence of (lon, lat) defining the area of interest.

  • base_url – Base URL hosting GBA parquet tiles.

  • download_dir – Optional directory to store downloaded tiles. If None, a temporary directory is used and cleaned up by the OS later.

  • clip_to_rectangle – If True, geometries are clipped to rectangle extent.

Returns:

4326 geometry and an β€˜id’ column, or None if no data.

Return type:

GeoDataFrame with EPSG