<div><font><font face="courier new,monospace">If I have a dataset with a scale and offset:<br></font></font></div><div><font><font face="courier new,monospace"><br></font></font></div><div><font><font face="courier new,monospace">kyle@ubuntu:~/Desktop$ gdalinfo test.tif <br>
</font></font></div><font><font face="courier new,monospace"> Driver: GTiff/GeoTIFF<br>Files: test.tif<br>Size is 738, 919<br>Coordinate System is:<br>PROJCS["WGS 84 / UTM zone 12N",<br>...<br>Origin = (279635.000000000000000,4878315.000000000000000)<br>
Pixel Size = (30.000000000000000,-30.000000000000000)<br>Metadata:<br> AREA_OR_POINT=Point<br>Image Structure Metadata:<br> INTERLEAVE=BAND<br>Corner Coordinates:<br>Upper Left ( 279635.000, 4878315.000) (113d44'58.90"W, 44d 1'29.65"N)<br>
Lower Left ( 279635.000, 4850745.000) (113d44'17.87"W, 43d46'37.04"N)<br> Upper Right ( 301775.000, 4878315.000) (113d28'25.33"W, 44d 1'52.37"N)<br>Lower Right ( 301775.000, 4850745.000) (113d27'48.41"W, 43d46'59.57"N)<br>
Center ( 290705.000, 4864530.000) (113d36'22.60"W, 43d54'14.96"N)<br> Band 1 Block=738x1 Type=Float32, ColorInterp=Gray<br> Offset: 1, Scale:0.1<br><br>and I warp the image:<br><br>kyle@ubuntu:~/Desktop$ gdalwarp -t_srs epsg:4326 test.tif warp.tif<br>
Creating output file that is 901P x 800L.<br>Processing input file test.tif.<br>0...10...20...30...40...50...60...70...80...90...100 - done.<br><br>My scale and offset disappear:<br><br>kyle@ubuntu:~/Desktop$ gdalinfo warp.tif<br>
<br>Driver: GTiff/GeoTIFF<br>Files: warp.tif<br>Size is 901, 800<br>Coordinate System is:<br>GEOGCS["WGS 84",<br>...<br> Origin = (-113.749693430469137,44.031215259056744)<br>Pixel Size = (0.000317850797006,-0.000317850797006)<br>
Metadata:<br> AREA_OR_POINT=Point<br>Image Structure Metadata:<br> INTERLEAVE=BAND<br>Corner Coordinates:<br> Upper Left (-113.7496934, 44.0312153) (113d44'58.90"W, 44d 1'52.37"N)<br> Lower Left (-113.7496934, 43.7769346) (113d44'58.90"W, 43d46'36.96"N)<br>
Upper Right (-113.4633099, 44.0312153) (113d27'47.92"W, 44d 1'52.37"N)<br>Lower Right (-113.4633099, 43.7769346) (113d27'47.92"W, 43d46'36.96"N)<br> Center (-113.6065016, 43.9040749) (113d36'23.41"W, 43d54'14.67"N)<br>
Band 1 Block=901x2 Type=Float32, ColorInterp=Gray<br><br>I couldn't find any docs on this. Is this known and/or expected? I would think scale and offset would be transferred to the new file.<br clear="all"></font></font><br>
<font face="courier new,monospace"><font>/**<br> *<br> * Kyle Shannon<br> * <a href="mailto:ksshannon@gmail.com" target="_blank">ksshannon@gmail.com</a><br> *<br> */</font></font><font><br></font><br>
<font><font face="courier new,monospace"><br></font></font>