I have data that I would like to create a GeoTIFF file with. I have the GDAL Python package installed. I also have 3 overlapping matrices with intensity values, latitudes, and longitudes. How can I create a GeoTIFF with that?
Edit: So this is what I am trying to do. Maybe there is a better way to do this. So I have a Geotiff file where the Geotransform is the default [0 1 0 0 0 1]. But there are tie grid points attached to the file. I preformed some segmentation on the image and I would like to replace the intensity values with the segmented image. To do this, the code I am using is :
driver = gdal.GetDriverByName("GTiff")
outdata = driver.Create(outFileName, rows, cols, 1, gdal.GDT_UInt16)
outdata.SetGeoTransform(ds.GetGeoTransform())
outdata.SetProjection(ds.GetProjection())
outdata.GetRasterBand(1).WriteArray(imgarray)
outdata.FlushCache()
outdata = None
band = None
ds = None
Where ds is the existing Geotiff file.
But the problem is this is creating a new Geotiff file where the tie grid points aren't being passed on. Therefore, when I save this new file, the geolocation information would be incorrect.