[GRASS-SVN] r60927 - grass-addons/grass7/imagery/i.rotate
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jun 23 03:06:16 PDT 2014
Author: neteler
Date: 2014-06-23 03:06:16 -0700 (Mon, 23 Jun 2014)
New Revision: 60927
Modified:
grass-addons/grass7/imagery/i.rotate/main.c
Log:
i.rotate: declare some missing vars, still segfault
Modified: grass-addons/grass7/imagery/i.rotate/main.c
===================================================================
--- grass-addons/grass7/imagery/i.rotate/main.c 2014-06-23 09:36:47 UTC (rev 60926)
+++ grass-addons/grass7/imagery/i.rotate/main.c 2014-06-23 10:06:16 UTC (rev 60927)
@@ -43,6 +43,9 @@
struct History history; /*metadata */
int infd, outfd;
void *inrast, *outrast;
+ char outName[GNAME_MAX];
+ struct Key_Value *proj_info, *unit_info;
+ struct pj_info proj;
G_gisinit(argv[0]);
@@ -120,8 +123,8 @@
}
}
}
- double theta=n->answer;
- double thetarad=theta*3.1415927/180;
+ double theta=atof(n->answer);
+ double thetarad=theta*M_PI/180;
double costheta=cos(thetarad);
double sintheta=sin(thetarad);
int newrow,newcol;
@@ -142,7 +145,7 @@
for (col = 0; col < ncols; col++)
{
if (matout[row][col]==-999.99){
- Rast_set_d_null_value(&outrast[col]);
+ Rast_set_d_null_value(&outrast[col], 1);
} else {
((DCELL *)outrast)[col] = matout[row][col];
}
More information about the grass-commit
mailing list