Skip to main content

A package for mapping parcels and buildings using various data sources

Project description

building2parcel-training

building2parcel-training is a Python package for mapping parcels and buildings, designed to assist in training models to associate buildings with their corresponding parcels. It provides functionality for loading, processing, and visualizing geospatial data for parcels and buildings.

Features

  • Load and process parcel and building data from shapefiles
  • Join parcel and building data based on spatial relationships
  • Generate maps using different base layers:
    • Mapbox satellite imagery
    • NASA GIBS REST API
    • NASA GIBS Web Map Service (WMS)
    • Simple maps without satellite imagery
  • Customize map output with various options
  • Support for creating training datasets for building-to-parcel association models

Installation

You can install building2parcel-training using pip:


pip install building2parcel-training

For development, clone the repository and install in editable mode:


git clone https://github.com/yourusername/building2parcel-training.git
cd building2parcel-training
pip install -e .

Usage

Here's a basic example of how to use building2parcel-training:

from building2parcel_training import ParcelBuildingMapper

# Initialize the mapper with paths to your data
parcels_path = "path/to/your/parcels.shp"
buildings_path = "path/to/your/buildings.shp"
mapper = ParcelBuildingMapper(parcels_path, buildings_path)

# Set output paths
parcels_output_path = "output/parcels/"
buildings_output_path = "output/buildings/"

# Generate maps using Mapbox satellite imagery
mapper.generate_maps(parcels_output_path, buildings_output_path,
                     start_index=0, end_index=5, distance=200,
                     map_type='mapbox_satellite')

# Generate simple maps without satellite imagery
mapper.generate_maps(parcels_output_path, buildings_output_path,
                     start_index=5, end_index=10, distance=200,
                     map_type='simple')

# Generate maps using NASA GIBS REST API
mapper.generate_maps(parcels_output_path, buildings_output_path,
                     start_index=10, end_index=15, distance=200,
                     map_type='nasa_gibs_rest')

# Generate maps using NASA GIBS WMS
mapper.generate_maps(parcels_output_path, buildings_output_path,
                     start_index=15, end_index=20, distance=200,
                     map_type='nasa_gibs_wms')

## Requirements

- matplotlib
- cartopy
- geopandas
- python-dotenv
- Pillow
- numpy
- owslib

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

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

## Acknowledgments

- Thanks to Mapbox and NASA GIBS for providing satellite imagery services.
- This project was developed to support machine learning efforts in associating buildings with their corresponding parcels.

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

parcel_building_mapper-0.1.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

parcel_building_mapper-0.1.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file parcel_building_mapper-0.1.0.tar.gz.

File metadata

File hashes

Hashes for parcel_building_mapper-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b50929c954302b41b09abeb7f418df0dcbde329f4136f6120b0e31e0427d64e5
MD5 5bf46d7f56251841aeeef870e425fd37
BLAKE2b-256 0356d8820121cbbfa8b68a8adc9a27fb86fdfcadf6d40a1123fb5a1fddf09c37

See more details on using hashes here.

File details

Details for the file parcel_building_mapper-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for parcel_building_mapper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d4534ec3ca946cc2e1f97b1e7223bd0c6d40b7ae058fe05aa900b6a4628ec465
MD5 8dcd7ea178d5ce4e47b28882e1133b64
BLAKE2b-256 6bf39adca57bcfd536360043e43a0546def600a769dc09d0751a015be5afeb64

See more details on using hashes here.

Supported by

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