Skip to main content

A tool for downloading and processing building footprints using bounding box data.

Project description

Download Building

Download Building is a Python package for downloading and processing building footprint data within a specified bounding box or area of interest (AOI). It leverages global datasets and outputs geospatial data files for further analysis.

Features

  • Process building footprints from a bounding box or shapefile.
  • Automatically download and filter building data using mercantile and shapely.
  • Save output as a GeoJSON file for GIS workflows.

Installation

You can install the package using pip:

pip install getbuildings

Usage

Command-Line Interface (CLI)

You can use the package from the command line by providing either a shapefile (.shp) or bounding box coordinates.

python -m getbuildings \
  --shp /path/to/aoi.shp \
  --output /path/to/output.geojson

Or, use bounding box coordinates:

python -m getbuildings \
  --minx <min_x> --miny <min_y> \
  --maxx <max_x> --maxy <max_y> \
  --output /path/to/output.geojson

Parameters

  • --shp: Path to the input shapefile defining the AOI (optional).
  • --minx, --miny, --maxx, --maxy: Bounding box coordinates (required if --shp is not provided).
  • --output: Path to save the output GeoJSON file (required).

Example

To process a bounding box:

python -m getbuildings \
  --minx -123.5 --miny 45.0 \
  --maxx -122.5 --maxy 46.0 \
  --output output.geojson

Development

Clone the Repository

To work on the project locally:

git clone https://github.com/arazshah/get_buildings.git
cd getbuildings

Install Dependencies

Install the required Python packages:

pip install -r requirements.txt

Run Locally

Run the script using sample inputs:

python main.py --minx -123.5 --miny 45.0 --maxx -122.5 --maxy 46.0 --output output.geojson

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feature-name).
  3. Commit your changes (git commit -m "Add feature").
  4. Push to the branch (git push origin feature-name).
  5. Open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

getbuildings-0.1.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

getbuildings-0.1.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file getbuildings-0.1.1.tar.gz.

File metadata

  • Download URL: getbuildings-0.1.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for getbuildings-0.1.1.tar.gz
Algorithm Hash digest
SHA256 703fe02a193476cac65a0a451ff61bcfa61a7b28500d6702c11abb28ec217850
MD5 e3c2c4898f29f60e38eae3885fc13645
BLAKE2b-256 1416c218340a51967a0e4135b0190ce4d56c3c72ab4b61be3d0e1862f7fae13b

See more details on using hashes here.

File details

Details for the file getbuildings-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: getbuildings-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for getbuildings-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5e2bdb467feefad01e5387c7767264387bdad680187df803454ec279df222df0
MD5 375440cc253f6e59bb193dddb4beb72d
BLAKE2b-256 fa29d8aa101c1adb036bc15fdf24ee1c6f024fa4029a625430d1f8ba395670ce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page