Commit 70d3386c authored by Mario Chirinos Colunga's avatar Mario Chirinos Colunga 💬

rgb l2

parent 1b66501e
......@@ -32,14 +32,14 @@ def rasterWkt(wkt, inputfile, outputfile):
print (wkt)
print (inputfile)
print (outputfile)
# intput = gdal.Open(inputfile)
# rows, cols, geotransform = intput.RasterYSize, intput.RasterXSize, intput.GetGeoTransform()
# # Read the input bands as numpy arrays.
# np_intput = intput.GetRasterBand(1).ReadAsArray(0,0,cols,rows)
intput = gdal.Open(inputfile)
rows, cols, geotransform = intput.RasterYSize, intput.RasterXSize, intput.GetGeoTransform()
# Read the input bands as numpy arrays.
np_intput = intput.GetRasterBand(1).ReadAsArray(0,0,cols,rows)
# driverTiff = gdal.GetDriverByName('GTiff')
# output = driverTiff.Create(outputfile, cols, rows, 1, gdal.GDT_Byte)
driverTiff = gdal.GetDriverByName('GTiff')
output = driverTiff.Create(outputfile, cols, rows, 1, gdal.GDT_Byte)
# output.GetRasterBand(1).SetNoDataValue(-99)
# output.GetRasterBand(1).WriteArray(np_intput)
# output.GetRasterBand(1).FlushCache()
......@@ -67,7 +67,7 @@ def rasterWkt(wkt, inputfile, outputfile):
feature = None
data_source = None
# output = None
output = None
def main(argv):
rasterWkt(argv[1], argv[2], argv[3])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment