<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Courier New";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-family:"Courier New"">Hi All,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">I am running into an issue with unscaling a multiband raster. I am creating a vrt from 5 xyz datasets. I use the following command:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">gdalbuildvrt –separate –srcnodata -9999 mmi.vrt csv\*<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">3 of the 5 rasters are of the lower 48 states of the US, the other 2 are only the western half. gdalbuildvrt works good, and pads the eastern half of the US with nodata values of -9999 for the western
rasters. I have to scale all of the bands, so I edit the vrt and add <Scale>100</Scale> to each VRTRasterBand<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">This displays correctly in gdalinfo:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">C:\Users\k\Desktop\mmi_tmp\vrt_test>gdalinfo -stats -nomd mmi.vrt<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Driver: VRT/Virtual Raster<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Files: mmi.vrt<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> csv\2008.WUS.Xpgv.537.2475<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> csv\2008.WUS.Xpgv.537.475<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> csv\UShazard.20081231.pga.10pc50<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> csv\UShazard.20081231.pga.2pc50<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> csv\UShazard.20081231.pga.5pc50<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Size is 1201, 509<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Coordinate System is `'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Origin = (-125.025000000000010,50.024999999999999)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Pixel Size = (0.050000000000000,-0.050000000000000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Corner Coordinates:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Upper Left (-125.0250000, 50.0250000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Lower Left (-125.0250000, 24.5750000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Upper Right ( -64.9750000, 50.0250000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Lower Right ( -64.9750000, 24.5750000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Center ( -95.0000000, 37.3000000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Band 1 Block=128x128 Type=Float32, ColorInterp=Undefined<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Min=0.100 Max=200.000<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Minimum=0.100, Maximum=200.000, Mean=10.363, StdDev=16.347<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> NoData Value=-9999<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Offset: 0, Scale:100<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Band 2 Block=128x128 Type=Float32, ColorInterp=Undefined<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Min=0.100 Max=123.982<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Minimum=0.100, Maximum=123.982, Mean=4.866, StdDev=8.152<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> NoData Value=-9999<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Offset: 0, Scale:100<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Band 3 Block=128x128 Type=Float32, ColorInterp=Undefined<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Min=0.005 Max=1.110<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Minimum=0.005, Maximum=1.110, Mean=0.041, StdDev=0.064<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> NoData Value=-9999<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Offset: 0, Scale:100<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Band 4 Block=128x128 Type=Float32, ColorInterp=Undefined<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Min=0.005 Max=2.037<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Minimum=0.005, Maximum=2.037, Mean=0.103, StdDev=0.150<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> NoData Value=-9999<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Offset: 0, Scale:100<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Band 5 Block=128x128 Type=Float32, ColorInterp=Undefined<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Min=0.005 Max=1.346<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Minimum=0.005, Maximum=1.346, Mean=0.063, StdDev=0.097<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> NoData Value=-9999<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Offset: 0, Scale:100<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">When I unscale the raster, the Full US bands do fine, but the no data value for the Western US Bands isn’t respected and the nodata values are changed. Am I missing something in my vrt? Any thoughts.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">C:\Users\k\Desktop\mmi_tmp\vrt_test>gdal_translate -unscale mmi.vrt mmi.tif<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Input file size is 1201, 509<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">0...10...20...30...40...50...60...70...80...90...100 - done.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">C:\Users\k\Desktop\mmi_tmp\vrt_test>gdalinfo -nomd -stats mmi.tif<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Driver: GTiff/GeoTIFF<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Files: mmi.tif<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Size is 1201, 509<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Coordinate System is `'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Origin = (-125.025000000000010,50.024999999999999)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Pixel Size = (0.050000000000000,-0.050000000000000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Corner Coordinates:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Upper Left (-125.0250000, 50.0250000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Lower Left (-125.0250000, 24.5750000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Upper Right ( -64.9750000, 50.0250000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Lower Right ( -64.9750000, 24.5750000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Center ( -95.0000000, 37.3000000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Band 1 Block=1201x1 Type=Float32, ColorInterp=Gray<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Minimum=-999900.000, Maximum=20000.000, Mean=-582357.045, StdDev=493551.313<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> NoData Value=-9999<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Band 2 Block=1201x1 Type=Float32, ColorInterp=Undefined<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Minimum=-999900.000, Maximum=12398.200, Mean=-582586.370, StdDev=493279.394<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> NoData Value=-9999<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Band 3 Block=1201x1 Type=Float32, ColorInterp=Undefined<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Minimum=0.500, Maximum=111.030, Mean=4.092, StdDev=6.447<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> NoData Value=-9999<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Band 4 Block=1201x1 Type=Float32, ColorInterp=Undefined<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Minimum=0.500, Maximum=203.720, Mean=10.284, StdDev=14.961<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> NoData Value=-9999<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Band 5 Block=1201x1 Type=Float32, ColorInterp=Undefined<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Minimum=0.500, Maximum=134.630, Mean=6.273, StdDev=9.686<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> NoData Value=-9999<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:#5F5F5F">Kyle Shannon</span></b><span style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:#5F5F5F"> </span><span style="font-size:8.0pt;font-family:"Verdana","sans-serif";color:#1F497D"><br>
</span><span style="font-size:7.5pt;font-family:"Verdana","sans-serif";color:#5F5F5F">Senior Software Engineer</span><span style="font-size:13.5pt;font-family:"Helvetica","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:7.5pt;font-family:"Verdana","sans-serif";color:#5F5F5F">GCS Research</span></b><b><span style="font-size:13.5pt;font-family:"Helvetica","sans-serif";color:black"><o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Verdana","sans-serif";color:#5F5F5F">Office 406-532-3254 • Direct 406-541-3276</span><span style="font-size:7.5pt;font-family:"Verdana","sans-serif";color:#5F5F5F"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Verdana","sans-serif";color:#5F5F5F"><a href="mailto:kshannon@gcs-research.com"><span style="color:blue">kshannon@gcs-research.com</span></a> •
</span><u><span style="font-size:7.5pt;font-family:"Verdana","sans-serif";color:blue"><a href="http://www.gcs-research.com/"><span style="color:blue">www.gcs-research.com</span></a></span></u><u><span style="font-size:7.5pt;font-family:"Verdana","sans-serif"">
<o:p></o:p></span></u></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>This email message is for the sole use of the intended recipient(s)
and may contain confidential and privileged information. Any
unauthorized review, use, disclosure or distribution is prohibited. If
you are not the intended recipient, please contact the sender by reply
email and delete the original message.
­­ </body>
</html>