I am using the NEDSnapshot of the NHDPlus Dataset as my raster files. They can be found at https://www.epa.gov/waterdata/nhdplus-california-data-vector-processing-unit-18. I have included an imgur album of my various files if that is helpful http://imgur.com/a/oVT3g. The album contains images of the individual rasters, the vrt, and the mosaic file which is faulty. Any thoughts on how to resolve this issue? I'm new to both python and gdal, so I'm kind of lost as to what I can do to resolve this issue.

My code:

import os 
f1 = r'C:\Users\User\Data\NHDPlusCA\NHDPlus18\NEDSnapshot\Ned18a\elev_cm'
f2 = r'C:\Users\User\Data\NHDPlusCA\NHDPlus18\NEDSnapshot\Ned18b\elev_cm'

os.system('gdalbuildvrt mosaic_CA.vrt {} {}'.format(f1, f2))
os.system('gdalwarp mosaic_CA.vrt -co BIGTIFF=YES --config GDAL_CACHEMAX 6000 -wm 500 mosaic_CA.tif')
  • Can you explain what is "faulty" in the mosaic file? – AndreJ Jul 24 '17 at 6:32
  • if you view the imgur album that I included you can see that the product of the gdalwarp is just random pixels of black and does not represent the combination of the original files. – Mitchell Sawtelle Jul 24 '17 at 17:03
  • Using GDAL from the command line and loading the result into QGIS, I saw the same image, but setting the min and max values to zero and 233703 made the image reasonable. Maybe the NODATA value caused your faulty look. – AndreJ Jul 25 '17 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.