Giter Club home page Giter Club logo

crop-big-tiff-file-into-smaller-tiles's Introduction

Patchify

Split Large TIFF Files into Smaller Tiles

This code is a script that can split large TIFF files into smaller tiles of a specified size (in this case, 500 x 500 pixels). It uses the GDAL library to read the TIFF files and create the smaller tiles.

The script first checks if the output folder exists and creates it if it doesn't. Then, it goes through all the files in the input folder and only considers TIFF files (those with the file extension ".tif").

For each TIFF file, it calculates the number of rows and columns of tiles required to cover the entire image, and then iterates over the rows and columns to extract the tiles. The tiles are extracted using the gdal.Translate method and saved in the output folder with a file name indicating the row and column number of the tile.

The code also handles the case of the last tile of each row, which may be smaller than the specified tile size (in this case, 250 x 512 pixels). This tile is extracted in the same way as the other tiles and saved with a file name indicating that it's the last column tile for the respective row.

Overall, this script provides an efficient way to split large TIFF files into smaller tiles for further processing. Alt text

crop-big-tiff-file-into-smaller-tiles's People

Contributors

azeemk210 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.