Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

gdal warp and glob through directory

from osgeo import gdal
import glob
import os

input_path = 'F:prepinput'
output_path = 'F:prepconverted'

data_to_process = glob.glob(os.path.join(input_path, '*.tif'))
for data_path in data_to_process:
    raster_dataset = gdal.Open(data_path, gdal.GA_ReadOnly)
    raster = gdal.Translate(os.path.join(output_path, os.path.basename(data_path)), raster_dataset, outputType = gdal.GDT_Float32)
Comment

PREVIOUS NEXT
Code Example
Python :: Iterate through string in chunks in python 
Python :: python monats liste 
Python :: open a tkinter window fullscreen with button 
Python :: urlib3 json 
Python :: sklearn mahalanobis distance 
Python :: flask run function every minute 
Python :: counter vectriozer in python 
Python :: sf.query_all( ) dataFrame records relation Id 
Python :: install first person controller python 
Python :: sss 
Python :: python no module named encodings 
Python :: yaml documentation 
Python :: numpy move columns 
Python :: Image loader RGB transform 
Python :: git ignore everything but python files 
Python :: create empty polygon python 
Python :: python3 netifaces get current interface 
Python :: spyder - identation 
Python :: cbv uk django 
Python :: compile and train cnn models 
Python :: extends template django file system 
Python :: fibonacci program in python 
Python :: starting python project 
Python :: using default as none in django mdoels 
Python :: filtrar en python/how to filter in python 
Python :: python interseciton of 2 sets 
Python :: check if set is a subset of another python 
Python :: pg_config for django_heroku 
Python :: python argparse one or the other 
Python :: # get documentation for module in terminal 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =