Skip to main content
Post Closed as "Not suitable for this site" by PolyGeo
deleted 87 characters in body; edited tags; edited title
Source Link
PolyGeo
  • 65.5k
  • 29
  • 115
  • 352

Reprojecting each tif located in a Folder Directory Usingusing GDAL in pythonPython

Python beginner here. I am using python to reproject a folder of rasters (.tifs). Each raster has a projection that I want to change to WGS 1984 (espg:4326). I want to use an open-source GIS library rather than ESRI's ArcPy library. I'm assuming this needs to occur with a loop going through my folder directory and reprojecting each raster one by one.

My current lines of code read:

newpath = 'path to my folder' 
for raster in os.listdir(newpath):
    gdal.Warp(new_filename, raster, dstSRS="+init=epsg:4326")

The problem I'm attempting to solve is how to correctly specify the output filename of each raster in the gdal.Warp line. 

Any suggestions? Please let me know if I need to provide further information or how to improve my question.

Reprojecting each tif located in a Folder Directory Using GDAL in python

Python beginner here. I am using python to reproject a folder of rasters (.tifs). Each raster has a projection that I want to change to WGS 1984 (espg:4326). I want to use an open-source GIS library rather than ESRI's ArcPy library. I'm assuming this needs to occur with a loop going through my folder directory and reprojecting each raster one by one.

My current lines of code read:

newpath = 'path to my folder' 
for raster in os.listdir(newpath):
    gdal.Warp(new_filename, raster, dstSRS="+init=epsg:4326")

The problem I'm attempting to solve is how to correctly specify the output filename of each raster in the gdal.Warp line. Any suggestions? Please let me know if I need to provide further information or how to improve my question.

Reprojecting each tif located in Folder Directory using GDAL in Python

Python beginner here. I am using python to reproject a folder of rasters (.tifs). Each raster has a projection that I want to change to WGS 1984 (espg:4326). I want to use an open-source GIS library rather than ESRI's ArcPy library. I'm assuming this needs to occur with a loop going through my folder directory and reprojecting each raster one by one.

My current lines of code read:

newpath = 'path to my folder' 
for raster in os.listdir(newpath):
    gdal.Warp(new_filename, raster, dstSRS="+init=epsg:4326")

The problem I'm attempting to solve is how to correctly specify the output filename of each raster in the gdal.Warp line. 

Any suggestions?

Source Link

Reprojecting each tif located in a Folder Directory Using GDAL in python

Python beginner here. I am using python to reproject a folder of rasters (.tifs). Each raster has a projection that I want to change to WGS 1984 (espg:4326). I want to use an open-source GIS library rather than ESRI's ArcPy library. I'm assuming this needs to occur with a loop going through my folder directory and reprojecting each raster one by one.

My current lines of code read:

newpath = 'path to my folder' 
for raster in os.listdir(newpath):
    gdal.Warp(new_filename, raster, dstSRS="+init=epsg:4326")

The problem I'm attempting to solve is how to correctly specify the output filename of each raster in the gdal.Warp line. Any suggestions? Please let me know if I need to provide further information or how to improve my question.