Michal,<br><br>I can't think of anything else that may be causing this. Can you run this using the latest version, gdal-1.8?<br><br><div class="gmail_quote">On Mon, May 16, 2011 at 11:14 PM, Michal Migurski <span dir="ltr"><<a href="mailto:mike@stamen.com" target="_blank">mike@stamen.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Chaitanya,<br>
<br>
Thanks for the advice - I've definitely ensured that the file does not exist first, cleared it out and re-ran gdal_merge.py. The result still has the same clipping to 255.<br>
<br>
-mike.<br>
<div><div></div><div><br>
On May 15, 2011, at 9:19 PM, Chaitanya kumar CH wrote:<br>
<br>
> Michal,<br>
><br>
> Check if the output file already exists. The script won't create a new one if it already exists.<br>
><br>
> On Mon, May 16, 2011 at 12:45 AM, Michal Migurski <<a href="mailto:mike@stamen.com" target="_blank">mike@stamen.com</a>> wrote:<br>
> Hello,<br>
><br>
> I'm attempting to merge a number of DEMs in .flt format using gdal_merge.py. It's NED 1/3 arc second data, so each one is a Float32 10812x10812 raster with a range of values from a few meters below sea level to 1.4km. I'm getting back an image with an incorrect datatype even though I believe that I'm using the right "-ot Float32" parameter to gdal_merge.py. I appear to have gdal 1.5.4 on this machine; I can upgrade to a newer one if necessary but I'd first like to make sure I'm not using the tool incorrectly.<br>
><br>
> Here's the command I use:<br>
><br>
> gdal_merge.py -o 38122.tif -of GTiff -ot Float32 -v -ul_lr -122.05 38.05 -121.95 37.95 10m/*.flt<br>
><br>
> What I get back is a 1080x1080 GeoTIFF with the correct bounds that I'm expecting, but what appears to be garbage data or perhaps just raw floating point values misinterpreted as bytes. Here's the output showing Byte values instead of Float32 as I'd expect:<br>
><br>
> Band 1 Block=1080x7 Type=Byte, ColorInterp=Gray<br>
> Min=0.000 Max=255.000<br>
> Minimum=0.000, Maximum=255.000, Mean=108.657, StdDev=66.615<br>
><br>
> This is a sample of the resulting image in pseudocolor, showing the vertical banding every 4px that makes me think the bytes are just a raw Float32 stream:<br>
><br>
> <a href="http://mike.teczno.com/img/38122-rainbow.png" target="_blank">http://mike.teczno.com/img/38122-rainbow.png</a><br>
><br>
> Here is a sample input band:<br>
><br>
> Band 1 Block=10812x1 Type=Float32, ColorInterp=Undefined<br>
> Computed Min/Max=-8.170,1440.937<br>
> NoData Value=-9999<br>
><br>
> Am I using -ot incorrectly?<br>
><br>
> -mike.<br>
><br>
> ----------------------------------------------------------------<br>
> michal migurski- <a href="mailto:mike@stamen.com" target="_blank">mike@stamen.com</a><br>
> 415.558.1610<br>
><br>
><br>
><br>
> _______________________________________________<br>
> gdal-dev mailing list<br>
> <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">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>
><br>
><br>
><br>
> --<br>
> Best regards,<br>
> Chaitanya kumar CH.<br>
> /tʃaɪθənjə/ /kʊmɑr/<br>
> +91-9494447584<br>
> 17.2416N 80.1426E<br>
<br>
----------------------------------------------------------------<br>
michal migurski- <a href="mailto:mike@stamen.com" target="_blank">mike@stamen.com</a><br>
415.558.1610<br>
<br>
<br>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">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>