I'm fairly new to GDAL and I have some GeoTIFF files that I would like to highlight some bodies of water on. I have gotten pretty far, but I have one problem. The only way I am able to highlight a body of water is with gdal.warp and cutlineDSName (I'm using osgeo gdal in Python), which is great, but it cuts out the rest of the image completely. What I would like to do is just draw a line, rather than cut the surrounding area out.
Can anyone help me out?
I'm hoping it's a flag that I am missing somewhere.
tifFile = 'C:\\merged.tif' shapeFile = 'C:\shapefile.shp' outFile = 'C:\\merged_and_cropped.tif' input_raster = tifFile output_raster = outFile input_kml = shapeFile ds = gdal.Warp(output_raster, input_raster, format = 'GTiff', cutlineDSName = shapeFile, cropToCutline=True, dstNodata = 0) ds = None