brails.scrapers.usa_footprint_scraper.usa_footprint_scraper module

This module defines the class object for downloading FEMA USA Structures data.

USA_FootprintScraper(input_dict)

A class to generate footprint data using FEMA USA Structures building data.

class brails.scrapers.usa_footprint_scraper.usa_footprint_scraper.USA_FootprintScraper(input_dict: dict)

Bases: FootprintScraper

A class to generate footprint data using FEMA USA Structures building data.

This class interacts with the FEMA USA Structures API to download building footprints, attributes (such as height), and additional metadata for a given geographic region. The class is built on top of the FootprintScraper class.

Attributes:
length_unit (str):

Unit of length for building heights (default is ‘ft’).

Methods:
get_footprints(region: RegionBoundary):

Obtains building footprints and creates an inventory for the specified region.

get_footprints(region: RegionBoundary) AssetInventory

Retrieve building footprints and attributes for a specified region.

This method divides the provided region into smaller cells, if necessary, and then downloads building footprint data for each cell using the FEMA USA Structures API. The footprints and attributes are returned as an AssetInventory for buildings within the region.

Args:
region (RegionBoundary):

The geographic region for which building footprints and attributes are to be obtained.

Returns:
AssetInventory:

An inventory of buildings in the region, including their footprints and associated attributes (e.g., height).

Raises:
TypeError:

If the ‘region’ argument is not an instance of the BRAILS++ ‘RegionBoundary’ class.

Notes:
  • The region is split into smaller cells if the bounding area contains more than the maximum allowed number of elements per cell.

  • If the plot_cells flag is set to True, the cell boundaries are plotted and saved as an image.

  • The method creates a polygon mesh for the region, splits it if needed, and downloads building data for each cell in the region.