Metadata-Version: 2.4
Name: geotiff_tiler_res
Version: 0.1.0
Summary: A tool to export georeferenced GeoTIFF tiles and labels from raster and classification data.
Home-page: https://github.com/knaxa/geotiff_tiler
Author: potacessium
Author-email: potacessium <kyush.naxa@gmail.com>
License: MIT License
        
        Copyright (c) 2025 Your Name
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/knaxa/geotiff_tiler
Project-URL: Repository, https://github.com/knaxa/geotiff_tiler
Project-URL: Issues, https://github.com/knaxa/geotiff_tiler/issues
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.21
Requires-Dist: rasterio>=1.3
Requires-Dist: geopandas>=0.10
Requires-Dist: shapely>=1.8
Requires-Dist: matplotlib>=3.5
Requires-Dist: tqdm>=4.60
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

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
