A tool to export georeferenced GeoTIFF tiles and labels from raster and classification data.
Project description
GeoTIFF Tiler A Python package to export georeferenced GeoTIFF tiles and labels from raster and classification data. Installation Install via pip: pip install geotiff_tiler
Usage Run the command-line tool: geotiff-tiler /path/to/input_dir /path/to/output_dir --tile-size 1024 --stride 512 --class-value-field road_type
Arguments
input_dir: Directory containing subdirectories with .tif and .geojson files. output_dir: Directory to save output tiles. --tile-size: Size of each tile in pixels (default: 1024). --stride: Step size between tiles in pixels (default: 512). --class-value-field: Field name for class values in vector data (default: "road_type"). --no-resume: Disable resuming existing tiles.
Programmatic Usage from geotiff_tiler import export_geotiff_tiles, process_directory
Process a directory
process_directory( input_dir="/path/to/input", output_dir="/path/to/output", tile_size=1024, stride=512, class_value_field="road_type", resume=True )
Export tiles for a single raster
stats = export_geotiff_tiles( in_raster="input.tif", out_folder="output", in_class_data="classes.geojson", tile_size=1024, stride=512, class_value_field="road_type" )
Dependencies
numpy>=1.21 rasterio>=1.3 geopandas>=0.10 shapely>=1.8 matplotlib>=3.5 tqdm>=4.60
License MIT License
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 geotiff_tiler_res-0.1.0.tar.gz.
File metadata
- Download URL: geotiff_tiler_res-0.1.0.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
822bb493ec2e4a8c5db36433ffcabb6d8c7ae42784b6db4eac0efbf7e0a92234
|
|
| MD5 |
7d9a624ee2fcbd58d9cee51e2be72f5f
|
|
| BLAKE2b-256 |
e955a9fca4bc35ce65a4c12b17bd27a968d97988d2275350138970cb345cf847
|
File details
Details for the file geotiff_tiler_res-0.1.0-py3-none-any.whl.
File metadata
- Download URL: geotiff_tiler_res-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d65fbff2fde431b299d1d6fea01ebd8e579757321ea3b6d831915aadcb7dc218
|
|
| MD5 |
636b4b9b94b9fde0af188163bc1939ce
|
|
| BLAKE2b-256 |
c0ca719b22be5f085832a8fb3856cd5f1e6ba05af9bc94ec0f30e2126008b7f9
|