소스 검색

i.atcorr: fix loading spectral responses (https://trac.osgeo.org/grass/ticket/3469)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@72054 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 7 년 전
부모
커밋
0cbdb5efb5
1개의 변경된 파일17개의 추가작업 그리고 0개의 파일을 삭제
  1. 17 0
      imagery/i.atcorr/iwave.cpp

+ 17 - 0
imagery/i.atcorr/iwave.cpp

@@ -7872,8 +7872,25 @@ void IWave::parse()
 	else G_warning(_("Unsupported iwave value: %d"), iwave);
     }
 
+    /* set wlinf, wlsup */
+    ffu.wlinf = 0.25;
+    iinf = 0;
+    while (ffu.s[iinf] == 0) {
+	ffu.wlinf += 0.0025;
+	iinf++;
+    }
+
+    ffu.wlsup = 4.0;
+    isup = 1500;
+    while (ffu.s[isup] == 0) {
+	ffu.wlsup -= 0.0025;
+	isup--;
+    }
+
+#if 0
     iinf = (int)((ffu.wlinf - 0.25f) / 0.0025f + 1.5f) - 1;	/* remember indexing */
     isup = (int)((ffu.wlsup - 0.25f) / 0.0025f + 1.5f) - 1;	/*		   "         */
+#endif
 
     if(iwave == 1)	/* moved here to avoid unnecessary gotos */
     {