Nop,<br><br>I didn't see the extent val_repl.py does the conversion. That is a problem.<br><br>Since you said that gdalwarp did not work, try gdal_merge.py with the options "-n -332768 -init 0".<br><br><div class="gmail_quote">
On Sat, Jun 26, 2010 at 3:58 PM, NopMap <span dir="ltr"><<a href="mailto:ekkehart@gmx.de">ekkehart@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
<br>
Chaitanya kumar CH wrote:<br>
><br>
><br>
> In line 93 in val_repl.py, the default value is taken as of type Byte. For<br>
> a<br>
> quick fix, mention the data type of the raster reported by gdalinfo with<br>
> the<br>
> option -ot to the script. Refer to (<br>
> <a href="http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/python/samples/val_repl.py#L61" target="_blank">http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/python/samples/val_repl.py#L61</a>)<br>
><br>
<br>
</div>Thanks, that was the reason. Now I got one step further, but it still does<br>
not work.<br>
<br>
The resulting TIF is now the same size as the original, but it appears that<br>
the georeferencing is lost in the process.<br>
<br>
The original file shows the folling information<br>
Size is 6001, 6001<br>
Coordinate System is:<br>
GEOGCS["WGS 84",<br>
DATUM["WGS_1984",<br>
SPHEROID["WGS 84",6378137,298.2572235630016,<br>
AUTHORITY["EPSG","7030"]],<br>
AUTHORITY["EPSG","6326"]],<br>
PRIMEM["Greenwich",0],<br>
UNIT["degree",0.0174532925199433],<br>
AUTHORITY["EPSG","4326"]]<br>
Origin = (14.999583744947651,40.000416787708332)<br>
Pixel Size = (0.000833333333333,-0.000833333333333)<br>
Metadata:<br>
AREA_OR_POINT=Area<br>
Image Structure Metadata:<br>
INTERLEAVE=BAND<br>
Corner Coordinates:<br>
Upper Left ( 14.9995837, 40.0004168) ( 14d59'58.50"E, 40d 0'1.50"N)<br>
Lower Left ( 14.9995837, 34.9995835) ( 14d59'58.50"E, 34d59'58.50"N)<br>
Upper Right ( 20.0004171, 40.0004168) ( 20d 0'1.50"E, 40d 0'1.50"N)<br>
Lower Right ( 20.0004171, 34.9995835) ( 20d 0'1.50"E, 34d59'58.50"N)<br>
Center ( 17.5000004, 37.5000001) ( 17d30'0.00"E, 37d30'0.00"N)<br>
Band 1 Block=6001x1 Type=Int16, ColorInterp=Gray<br>
NoData Value=-32768<br>
<br>
After processing with val_rpl.py, gdalmerge quits with an error and gdalinfo<br>
reports:<br>
Size is 6001, 6001<br>
Coordinate System is `'<br>
Image Structure Metadata:<br>
INTERLEAVE=BAND<br>
Corner Coordinates:<br>
Upper Left ( 0.0, 0.0)<br>
Lower Left ( 0.0, 6001.0)<br>
Upper Right ( 6001.0, 0.0)<br>
Lower Right ( 6001.0, 6001.0)<br>
Center ( 3000.5, 3000.5)<br>
Band 1 Block=6001x1 Type=Int16, ColorInterp=Gray<br>
<br>
What did I miss this time?<br>
<br>
Nop<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/Handling-nodata-values-tp5222453p5224918.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/Handling-nodata-values-tp5222453p5224918.html</a><br>
</font><div><div></div><div class="h5">Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E<br>