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
mercantileandshapely. - 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--shpis 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:
- Fork the repository.
- Create a feature branch (
git checkout -b feature-name). - Commit your changes (
git commit -m "Add feature"). - Push to the branch (
git push origin feature-name). - Open a pull request.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Acknowledgments
- mercantile for tile processing.
- Shapely for geometry operations.
- GeoPandas for geospatial data handling.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
703fe02a193476cac65a0a451ff61bcfa61a7b28500d6702c11abb28ec217850
|
|
| MD5 |
e3c2c4898f29f60e38eae3885fc13645
|
|
| BLAKE2b-256 |
1416c218340a51967a0e4135b0190ce4d56c3c72ab4b61be3d0e1862f7fae13b
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e2bdb467feefad01e5387c7767264387bdad680187df803454ec279df222df0
|
|
| MD5 |
375440cc253f6e59bb193dddb4beb72d
|
|
| BLAKE2b-256 |
fa29d8aa101c1adb036bc15fdf24ee1c6f024fa4029a625430d1f8ba395670ce
|