<div dir="ltr">Hi all<div><br></div><div>After an unsuccessful import of ASTER images, I went looking into the r.in.aster script and made a few changes that allowed me to import correctly the images.</div><div><br></div><div>OS: Mac OSX El Capitan (with Michael's binary version 7.0.3)<br clear="all"><div><br></div><div>The original issues: The individual bandas were being imported with 15m resolution for all bands (the region wasn't being re-set for the coarser resolutions), and all bands imported after 3B had the southern section of the 3B band (the temp file wasn't being reseted).</div><div><br></div><div>My changes:</div><div><br></div><div>1 - I changed the band names from 1,2,3b... to 01, 02, 03b... so they are listed in the right order by the gui (instead of 1, 10, 11,...)</div><div><br></div><div>2 - I moved the lines: </div><div><br></div><div>tempfile = grass.read_command("g.tempfile", pid = os.getpid()).strip() + '.tif'<br></div><div><br></div><div>grass.try_remove(tempfile)<br></div><div><br></div><div>to the loop:</div><div><br></div><div><div>    if proctype in ["L1A", "L1B"]:</div><div>        for band in bandlist:</div><div>            if band in allbands:</div></div><div><br></div><div>so the tempfile is created and destroyed for each band, assuring it is created according to the band spatial extent and resolution.</div><div><br></div><div><br></div><div>3 - This line was giving me errors:</div><div><div>    if platform.system() == "Darwin":</div><div>        cmd = ["arch", "-i386", "gdalwarp", "-t_srs", proj, srcfile, tempfile ]</div></div><div><br></div><div>arch: posix_spawnp: gdalwarp: Bad CPU type in executable<br></div><div><br></div><div><br></div><div>This is probably because I run OSC El Cap, which is 64bits. So to get it working, I had to ignore this system test and use </div><div><br></div><div>cmd = ["gdalwarp", "-t_srs", proj, srcfile, tempfile ]<br></div><div><br></div><div>Nut I'm not sure what would be the best way to keep the test and maintain compatibility with older systems. Perhaps a try/except would do.</div><div><br></div><div><br></div><div>I attached the modified version.</div><div><br></div><div>best</div><div><br></div><div>Carlos</div><div><br></div><div><br></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Prof. Carlos Henrique Grohmann<br>Institute of Energy and Environment - Univ. of São Paulo, Brazil<div>- Digital Terrain Analysis | GIS | Remote Sensing - </div><div><br></div><div><a href="http://carlosgrohmann.com/" target="_blank">http://carlosgrohmann.com</a></div><div><a href="http://orcid.org/0000-0001-5073-5572" style="font-size:13px;color:rgb(17,85,204);font-family:arial,sans-serif;background-color:rgb(255,255,255)" target="_blank">http://orcid.org/0000-0001-5073-5572</a><br><div>________________<br>Can’t stop the signal.</div></div></div></div>
</div></div>