Skip to main content
naming
Source Link
Vince
  • 20.3k
  • 16
  • 48
  • 65

Open .tiff, set projection, then re-save in pythonPython with gdalGDAL

I am trying to set the projections of a .tiff file from another file with gdalGDAL in pythonPython. I successfully set the projections, but how do I re-save the .tiff afterwards?

Here is my code:

ds = gdal.Open('satellite_image.tif')
prj = ds.GetProjection()

roads = gdal.Open('road_lines.tiff')
roads.SetProjection(prj)

Open .tiff, set projection, then re-save in python with gdal

I am trying to set the projections of a .tiff file from another file with gdal in python. I successfully set the projections, but how do I re-save the .tiff afterwards?

Here is my code:

ds = gdal.Open('satellite_image.tif')
prj = ds.GetProjection()

roads = gdal.Open('road_lines.tiff')
roads.SetProjection(prj)

Open .tiff, set projection, then re-save in Python with GDAL

I am trying to set the projections of a .tiff file from another file with GDAL in Python. I successfully set the projections, but how do I re-save the .tiff afterwards?

Here is my code:

ds = gdal.Open('satellite_image.tif')
prj = ds.GetProjection()

roads = gdal.Open('road_lines.tiff')
roads.SetProjection(prj)
Source Link

Open .tiff, set projection, then re-save in python with gdal

I am trying to set the projections of a .tiff file from another file with gdal in python. I successfully set the projections, but how do I re-save the .tiff afterwards?

Here is my code:

ds = gdal.Open('satellite_image.tif')
prj = ds.GetProjection()

roads = gdal.Open('road_lines.tiff')
roads.SetProjection(prj)