TanDEM GeoTIFFs are of type "Pixel is point"
Size is 1201, 1201
Coordinate System is:
DATUM["World Geodetic System 1984",
I've found an answer on the project-page of exiftool itself.
Hereafter, I'll summarize what I found out with the kind help of the page-author Phil Harvey.
To copy all GeoTiff tags from one file to another, do this:
exiftool -tagsfromfile SRCFILE -GeoTiffDirectory -GeoTiffDoubleParams -GeoTiffAsciiParams DSTFILE
That does the trick.
I assume that those ...
You can download the CSVs first and look at it in QGIS
Then you can move on to GeoTiff which can also be viewed in QGIS. When you have that working you can export the data into a vector format like GeoJSON and use it in CartoDB or another ...
Pillow isn't a geospatial library, I recommend looking at rasterio resampling
from rasterio.enums import Resampling
# Register GDAL format drivers and configuration options with a
# context manager.
with rasterio.open('/path/to/input.tif') as dataset:
data = dataset.read(1, out_shape=(1200, ...
I was able to recover the spatial referencing of the original georefernced tif using gdal translate.
import gdal, osr
original = gdal.Open('path to tif') # the original georeferenced tif
in_tif = 'path to watermarked tif' # the one that lost spatial reference
out_tif = 'path to tif to be created' # the georeferenced output tif
rf = ...
gdal_retile -s_srs option sets the source spatial reference system, from your question it is already set as something different. -s_srs is for situations when you know the projection of the data but the data (or associated metadata files) doesn't know or is incorrect. So never use this option if there is a projection set.
If you would like to reproject the ...
It looks like the only piece missing from your write call is a transform:
with rasterio.open(imgPath) as src:
win = Window(1000, 1000, 500, 300)
tile = src.read(1, window=win)
win_transform = src.window_transform(win)