ocssw
V2022
|
cyan_conus_tiles.py
Go to the documentation of this file.
19 description='This script generates 54 GeoTIFF tiles in a 9x6 grid from an input full\nCONUS GeoTIFF\n' +
26 args = parser.parse_args()
28 nXtiles = 9
29 nYtiles = 6
31 sourcefile = args.ifile
34 srcDS = gdal.Open(sourcefile)
36 T0 = Affine.from_gdal(*srcDS.GetGeoTransform())
50 ytile = y + 1
51 uly = y * ystride + yoff
54 xtile = x +1
55 ulx = x * xstride + xoff
56 srcwin = [ulx,uly,xstride,ystride]
61 gdal.Translate(tileFile,srcDS, options=transop)