Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

gdal split bog image to small python

import os, gdal
from gdalconst import *

width = 512
height = 512
tilesize = 64

for i in range(0, width, tilesize):
    for j in range(0, height, tilesize):
        gdaltranString = "gdal_translate -of GTIFF -srcwin "+str(i)+", "+str(j)+", "+str(tilesize)+", " 
            +str(tilesize)+" utm.tif utm_"+str(i)+"_"+str(j)+".tif"
        os.system(gdaltranString)
Comment

PREVIOUS NEXT
Code Example
Python :: search recurse sub-folders using glob.glob module python 
Python :: Python NumPy append Function Example Working with axis 
Python :: Python NumPy tile Function Example when (repetitions == arr.ndim) == 0 
Python :: fpdf latin-1 
Python :: unsupported operand type python 
Python :: pytorch Jaccard Index 
Python :: Python __ge__ 
Python :: Python how to use __le__ 
Python :: how to get defintiion of pysspark teable 
Python :: pandas listagg equivalent in python 
Python :: make all subplots same height 
Python :: Snippet for inverse a matrix using numpy 
Python :: django view - mixins and GenericAPIView (list or create - GET, POST) 
Python :: change admin password djano 
Python :: python mysqldb sockets 
Python :: how to use python telegram filters 
Python :: create loop python 
Python :: for loop for calendar day selection using selenium python 
Python :: python Tkinter widget displacement with pack() 
Python :: browser environment: 
Python :: Library for removal of punctuation and defining function 
Python :: What is the right way to do such import 
Python :: dict python inpmenttion 
Python :: python regex with f-string 
Python :: ring For in Loop 
Python :: text to ascii art generator python 
Python :: how to start spaCy code 
Python :: module not found after sucessful install 
Python :: how to add illegal characters to paths python 
Python :: y level for iron 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =