[gdal-dev] Re: Handling nodata values

2010-06-26 Thread NopMap
Even Rouault wrote: > > Yo say 'gdalmerge quits with an error', but you didn't mention the exact > error > message nor the command line you've used, so it is hard to tell what's > wrong > Oh, that cause was obvious. Since the TIF had lost the georefence, there was no overlap between the reque

[gdal-dev] Re: Handling nodata values

2010-06-26 Thread NopMap
Chaitanya kumar CH wrote: > > Since you said that gdalwarp did not work, try gdal_merge.py with the > options "-n -332768 -init 0". > Thank you, this did the job! Nop -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Handling-nodata-values-tp5222453p5224997.html Sent

Re: [gdal-dev] Re: Handling nodata values

2010-06-26 Thread Even Rouault
Nop, val_repl.py wasn't copying georeferencing from input dataset to output dataset. I've just improved that now. There's another existing script that you can use to copy georeferencing from an input dataset to an existing output dataset. The pixel data of the output dataset is left untouched.

Re: [gdal-dev] Re: Handling nodata values

2010-06-26 Thread Chaitanya kumar CH
Nop, I didn't see the extent val_repl.py does the conversion. That is a problem. Since you said that gdalwarp did not work, try gdal_merge.py with the options "-n -332768 -init 0". On Sat, Jun 26, 2010 at 3:58 PM, NopMap wrote: > > > Chaitanya kumar CH wrote: > > > > > > In line 93 in val_repl

[gdal-dev] Re: Handling nodata values

2010-06-26 Thread NopMap
Chaitanya kumar CH wrote: > > > In line 93 in val_repl.py, the default value is taken as of type Byte. For > a > quick fix, mention the data type of the raster reported by gdalinfo with > the > option -ot to the script. Refer to ( > http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/python/samp

Re: [gdal-dev] Re: Handling nodata values

2010-06-26 Thread Chaitanya kumar CH
Nop, In line 93 in val_repl.py, the default value is taken as of type Byte. For a quick fix, mention the data type of the raster reported by gdalinfo with the option -ot to the script. Refer to ( http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/python/samples/val_repl.py#L61) On Sat, Jun 26, 20

[gdal-dev] Re: Handling nodata values

2010-06-25 Thread NopMap
Thank you for your reply. I played around a little bit but without success. When I apply val_repl.py to the data, it appears to cut off all the higher elevations while the lower areas remain untouched. So the resulting TIF is unusable. What could cause this problem? gdal_contour seems to recogn