I'm using gdalwarp to convert MODIS NDVI mosaics from Sinusoidal to epsg:4326. To save space I'm using VRT files until I reach the final product. Here is my workflow.
- Mosaic NDVI Modis tiles using pyModis and output as VRT. NoData value (-3000) is kept
- gdalwarp the VRT mosaic to epsg:4326, tiff output. Pixels with NoData recieve value 0
My gdalwarp command is:
gdalwarp -t_srs epsg:4326 -tr 0.002 0.002 modis_mosaic.vrt reprojetc_mosaic.tif
Gdalinfo on the reprojected file shows that NoData values are kept (-3000) but nodata pixels in the image are converted to 0.
I'm using gdal 1.11.1 in Ubuntu linux
Best Answer
Doing some more searching I found out that a bug related to gdalwarp and NODATA was fixed in version 1.11.2.
http://trac.osgeo.org/gdal/wiki/Release/1.11.2-News
http://trac.osgeo.org/gdal/ticket/5675
Testing on another machine with gdal 1.11.2 worked.