GithubHelp home page GithubHelp logo

osgeonepal / geotile Goto Github PK

View Code? Open in Web Editor NEW
69.0 2.0 9.0 126 KB

GeoTile is the python library for tiling the geographic raster data (eg. Tiff etc)

Home Page: https://geotile.readthedocs.io

License: MIT License

Python 100.00%
python raster spatialdata tiff tiling geotiler tiling-image gis map-tiles remote-sensing

geotile's Introduction

Downloads PyPI version License: MIT

GeoTile

GeoTile is an open-source python library for creating and manipulating the tiles of the raster dataset. The package will be very useful for managing the raster tiles which can be used for deep learning traing dataset.

Full documentation

The complete documentation of this package is available here: https://geotile.readthedocs.io/en/latest/

Installation

The easy installation of geotile is by using conda environment,

conda install -c conda-forge geotile

If you want to install it for pip, check the documentation here: https://geotile.readthedocs.io/en/latest/pages/install.html

Some basic examples

Please check the complete documentation here: https://geotile.readthedocs.io/en/latest/

from geotile import GeoTile
gt = GeoTile(r"path/to/raster/data.tif")

# to generate the tiles of raster
gt.generate_tiles(r'/path/to/output/folder', tile_x=256, tile_y=256, stride_x=256, stride_y=256)

# to generate the tiles of selected bands only
gt.generate_tiles(r'/path/to/output/folder', bands=[4, 3, 2], tile_x=256, tile_y=256, stride_x=256, stride_y=256)

# to merge the tiles
from geotile import mosaic
mosaic('/path/to/input/folder/tiles', output_file='path/to/output/file.tif')

# to generate the raster mask from shapefile
gt.mask('/path/to/shapefile.shp', '/path/to/output/file.tif')

# to rasterize the shapefile based on column value,
gt.rasterization(input_vector='path/to/shp.shp', out_path='path/to/output.tif' value_col="value_col")

# to close the file
gt.close()

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.