Joaquim, On Wed, May 12, 2010 at 5:07 AM, Joaquim Luis <jl...@ualg.pt> wrote:
> Hi, > > Before filling a ticket I would like to ask here if this gdalwarp behavior > is the intended one. > When I convert a grid from geogs to UTM the nodatavalues are filled with > zeros. > I get the expected behaviour if I use the -dstnodata with a numeric value, > but I found no way tom tell it use NaN. > > Summary > > This puts zeros on the nodata zone, but I don't find it correct as "0" is > not exactly a natural nodata value. For my habits NaN is the natural no data > value. > NaN should always be treated as a special case in coding. Imagine performing a type conversion. Since we usually deal with real world data, we know the data value range. We should be able to choose a nodata value not in the data range. > gdalwarp -s_srs "+proj=latlong" -t_srs "+proj=utm +zone=29 +datum=WGS84" > swath_grid.grd lixo_utm.tiff > > Furthermore when I load the " lixo_utm.tiff" in Mirone is does not > recognize a nodata value, whilst if I do this instead > > gdalwarp -s_srs "+proj=latlong" -t_srs "+proj=utm +zone=29 +datum=WGS84" > -dstnodata 1 swath_grid.grd lixo_utm.tiff > > than "1" is recognized as the nodata. I have not investigated the metadata > to see why the "0" is not set to represent the nodata. > Perhaps swath_grid.grd doesn't have a nodata value set. > > Thanks > > Joaquim Luis > _______________________________________________ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/gdal-dev > -- Best regards, Chaitanya kumar CH. /tʃaɪθənjə/ /kʊmɑr/ +91-9848167848 17.2416N 80.1426E
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev